diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-03-15 23:26:50 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-03-15 23:26:50 +0100 |
commit | 855f4e4f0f22b35641f13614e46b9ab7f6818188 (patch) | |
tree | 9a776e07429c16e1df68f4b04c125c46185eed16 /.config/nvim/lua/lsp | |
parent | 8577c3b7cba714551d3537f3337ee2490bd20106 (diff) |
Migration to lua
Diffstat (limited to '.config/nvim/lua/lsp')
-rw-r--r-- | .config/nvim/lua/lsp/bash-ls.lua (renamed from .config/nvim/lua/lsp/bash.lua) | 0 | ||||
-rw-r--r-- | .config/nvim/lua/lsp/docker-ls.lua (renamed from .config/nvim/lua/lsp/docker.lua) | 0 | ||||
-rw-r--r-- | .config/nvim/lua/lsp/init.lua | 19 | ||||
-rw-r--r-- | .config/nvim/lua/lsp/json-ls.lua (renamed from .config/nvim/lua/lsp/json.lua) | 0 | ||||
-rw-r--r-- | .config/nvim/lua/lsp/lsp-config.lua | 4 | ||||
-rw-r--r-- | .config/nvim/lua/lsp/lsp-kind.lua | 26 | ||||
-rw-r--r-- | .config/nvim/lua/lsp/lua-ls.lua (renamed from .config/nvim/lua/lsp/lua.lua) | 0 | ||||
-rw-r--r-- | .config/nvim/lua/lsp/python-ls.lua (renamed from .config/nvim/lua/lsp/python.lua) | 0 | ||||
-rw-r--r-- | .config/nvim/lua/lsp/yaml-ls.lua (renamed from .config/nvim/lua/lsp/yaml.lua) | 0 |
9 files changed, 19 insertions, 30 deletions
diff --git a/.config/nvim/lua/lsp/bash.lua b/.config/nvim/lua/lsp/bash-ls.lua index 8be0383..8be0383 100644 --- a/.config/nvim/lua/lsp/bash.lua +++ b/.config/nvim/lua/lsp/bash-ls.lua diff --git a/.config/nvim/lua/lsp/docker.lua b/.config/nvim/lua/lsp/docker-ls.lua index ad6e220..ad6e220 100644 --- a/.config/nvim/lua/lsp/docker.lua +++ b/.config/nvim/lua/lsp/docker-ls.lua diff --git a/.config/nvim/lua/lsp/init.lua b/.config/nvim/lua/lsp/init.lua new file mode 100644 index 0000000..4515e7c --- /dev/null +++ b/.config/nvim/lua/lsp/init.lua @@ -0,0 +1,19 @@ +--TODO figure out why this don't work +vim.fn.sign_define("LspDiagnosticsSignError", {texthl = "LspDiagnosticsSignError", text = "", numhl = "LspDiagnosticsSignError"}) +vim.fn.sign_define("LspDiagnosticsSignWarning", {texthl = "LspDiagnosticsSignWarning", text = "", numhl = "LspDiagnosticsSignWarning"}) +vim.fn.sign_define("LspDiagnosticsSignInformation", {texthl = "LspDiagnosticsSignInformation", text = "", numhl = "LspDiagnosticsSignInformation"}) +vim.fn.sign_define("LspDiagnosticsSignHint", {texthl = "LspDiagnosticsSignHint", text = "", numhl = "LspDiagnosticsSignHint"}) + +vim.cmd('nnoremap <silent> gd <cmd>lua vim.lsp.buf.definition()<CR>') +vim.cmd('nnoremap <silent> gD <cmd>lua vim.lsp.buf.declaration()<CR>') +vim.cmd('nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR>') +vim.cmd('nnoremap <silent> gi <cmd>lua vim.lsp.buf.implementation()<CR>') +vim.cmd('nnoremap <silent> ca :Lspsaga code_action<CR>') +vim.cmd('nnoremap <silent> K :Lspsaga hover_doc<CR>') +-- vim.cmd('nnoremap <silent> <C-k> <cmd>lua vim.lsp.buf.signature_help()<CR>') +vim.cmd('nnoremap <silent> <C-p> :Lspsaga diagnostic_jump_prev<CR>') +vim.cmd('nnoremap <silent> <C-n> :Lspsaga diagnostic_jump_next<CR>') +-- scroll down hover doc or scroll in definition preview +vim.cmd('nnoremap <silent> <C-f> <cmd>lua require(\'lspsaga.action\').smart_scroll_with_saga(1)<CR>') +-- scroll up hover doc +vim.cmd('nnoremap <silent> <C-b> <cmd>lua require(\'lspsaga.action\').smart_scroll_with_saga(-1)<CR>') diff --git a/.config/nvim/lua/lsp/json.lua b/.config/nvim/lua/lsp/json-ls.lua index d13fed3..d13fed3 100644 --- a/.config/nvim/lua/lsp/json.lua +++ b/.config/nvim/lua/lsp/json-ls.lua diff --git a/.config/nvim/lua/lsp/lsp-config.lua b/.config/nvim/lua/lsp/lsp-config.lua deleted file mode 100644 index fe5dfb7..0000000 --- a/.config/nvim/lua/lsp/lsp-config.lua +++ /dev/null @@ -1,4 +0,0 @@ -vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnosticsDefaultError"}) -vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"}) -vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"}) -vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"}) diff --git a/.config/nvim/lua/lsp/lsp-kind.lua b/.config/nvim/lua/lsp/lsp-kind.lua deleted file mode 100644 index de928c2..0000000 --- a/.config/nvim/lua/lsp/lsp-kind.lua +++ /dev/null @@ -1,26 +0,0 @@ --- commented options are defaults -require('lspkind').init({ - with_text = false, - symbol_map = { - Text = ' ', - Method = ' ', - Function = ' ', - Constructor = ' ', - Variable = '[]', - Class = ' ', - Interface = ' 蘒', - Module = ' ', - Property = ' ', - Unit = ' 塞 ', - Value = ' ', - Enum = ' 練', - Keyword = ' ', - Snippet = ' ', - Color = '', - File = '', - Folder = ' ﱮ ', - EnumMember = ' ', - Constant = ' ', - Struct = ' ' - }, -}) diff --git a/.config/nvim/lua/lsp/lua.lua b/.config/nvim/lua/lsp/lua-ls.lua index c04219a..c04219a 100644 --- a/.config/nvim/lua/lsp/lua.lua +++ b/.config/nvim/lua/lsp/lua-ls.lua diff --git a/.config/nvim/lua/lsp/python.lua b/.config/nvim/lua/lsp/python-ls.lua index 11eeef9..11eeef9 100644 --- a/.config/nvim/lua/lsp/python.lua +++ b/.config/nvim/lua/lsp/python-ls.lua diff --git a/.config/nvim/lua/lsp/yaml.lua b/.config/nvim/lua/lsp/yaml-ls.lua index 904f20e..904f20e 100644 --- a/.config/nvim/lua/lsp/yaml.lua +++ b/.config/nvim/lua/lsp/yaml-ls.lua |