diff options
author | Chris <[email protected]> | 2021-03-10 02:59:59 -0500 |
---|---|---|
committer | Chris <[email protected]> | 2021-03-10 02:59:59 -0500 |
commit | d2bf2ed847e4d43032c2f65ed53302deeefc4399 (patch) | |
tree | 80b41b94dedbaaa8ef4c8c04b875d94304dedf08 | |
parent | 474f961b2a31c0fe8281188150c08cc2849bf4df (diff) |
updates
-rw-r--r-- | init.vim | 40 | ||||
-rw-r--r-- | lua/lsp/lua-ls.lua | 31 | ||||
-rw-r--r-- | plug-config/nvimtree-config.vim | 4 | ||||
-rw-r--r-- | vim-plug/plugins.vim | 2 |
4 files changed, 43 insertions, 34 deletions
@@ -68,6 +68,27 @@ else luafile ~/.config/nvim/lua/lsp/vim-ls.lua luafile ~/.config/nvim/lua/lsp/yaml-ls.lua " https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md + + " TODO highlight groups for native LSP diagnostics + " add back other docs for compe + nnoremap <silent> K <cmd>lua require('lspsaga.hover').render_hover_doc()<CR> + + " -- scroll down hover doc or scroll in definition preview + nnoremap <silent> <C-f> <cmd>lua require('lspsaga.action').smart_scroll_with_saga(1)<CR> + " -- scroll up hover doc + nnoremap <silent> <C-b> <cmd>lua require('lspsaga.action').smart_scroll_with_saga(-1)<CR> + " signature + nnoremap <silent> gs <cmd>lua require('lspsaga.signaturehelp').signature_help()<CR> + + + " Lightbulb + autocmd CursorHold,CursorHoldI * lua require'nvim-lightbulb'.update_lightbulb() + + "TODO + " fix space and tab triggering completion all the time + " autoimport jsx + " snippets + " https://github.com/mfussenegger/nvim-jdtls endif source $HOME/.config/nvim/plug-config/quickscope.vim @@ -80,22 +101,3 @@ endif inoremap <expr> <c-j> ("\<C-n>") inoremap <expr> <c-k> ("\<C-p>") -" TODO highlight groups for native LSP diagnostics -" add back other docs for compe -nnoremap <silent> K <cmd>lua require('lspsaga.hover').render_hover_doc()<CR> - -" -- scroll down hover doc or scroll in definition preview -nnoremap <silent> <C-f> <cmd>lua require('lspsaga.action').smart_scroll_with_saga(1)<CR> -" -- scroll up hover doc -nnoremap <silent> <C-b> <cmd>lua require('lspsaga.action').smart_scroll_with_saga(-1)<CR> -" signature -nnoremap <silent> gs <cmd>lua require('lspsaga.signaturehelp').signature_help()<CR> - - -" Lightbulb -autocmd CursorHold,CursorHoldI * lua require'nvim-lightbulb'.update_lightbulb() - -"TODO -" fix space and tab triggering completion all the time -" autoimport jsx -" snippets diff --git a/lua/lsp/lua-ls.lua b/lua/lsp/lua-ls.lua index 95e72216..22ffb529 100644 --- a/lua/lsp/lua-ls.lua +++ b/lua/lsp/lua-ls.lua @@ -1,20 +1,25 @@ -- https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone) -- TODO fix for different systems and put variable for user --- local system_name --- if vim.fn.has("mac") == 1 then --- system_name = "macOS" --- elseif vim.fn.has("unix") == 1 then --- system_name = "Linux" --- elseif vim.fn.has('win32') == 1 then --- system_name = "Windows" --- else --- print("Unsupported system for sumneko") --- end +user="chris" --- set the path to the sumneko installation; if you previously installed via the now deprecated :LspInstall, use -local sumneko_root_path = "/Users/chris/.config/nvim/lua-language-server" -local sumneko_binary = "/Users/chris/.config/nvim/lua-language-server/bin/macOS/lua-language-server" +local sumneko_root_path = "" +local sumneko_binary = "" + +local system_name +if vim.fn.has("mac") == 1 then + sumneko_root_path = "/Users/"..user.."/.config/nvim/lua-language-server" + sumneko_binary = "/Users/"..user.."/.config/nvim/lua-language-server/bin/macOS/lua-language-server" +elseif vim.fn.has("unix") == 1 then + sumneko_root_path = "/home/"..user.."/.config/nvim/lua-language-server" + sumneko_binary = "/home/"..user.."/.config/nvim/lua-language-server/bin/Linux/lua-language-server" +elseif vim.fn.has('win32') == 1 then + -- sumneko_root_path = "/Users/chris/.config/nvim/lua-language-server" + -- sumneko_binary = "/Users/chris/.config/nvim/lua-language-server/bin/macOS/lua-language-server" + print("Unsupported system for me") +else + print("Unsupported system for sumneko") +end require'lspconfig'.sumneko_lua.setup { cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"}; diff --git a/plug-config/nvimtree-config.vim b/plug-config/nvimtree-config.vim index 34e98991..3371d284 100644 --- a/plug-config/nvimtree-config.vim +++ b/plug-config/nvimtree-config.vim @@ -12,8 +12,8 @@ let g:nvim_tree_git_hl = 1 "0 by default, will enable file highlight for git att " let g:nvim_tree_root_folder_modifier = ':~' "This is the default. See :help filename-modifiers for more options " let g:nvim_tree_tab_open = 1 "0 by default, will open the tree when entering a new tab and the tree was previously open " let g:nvim_tree_width_allow_resize = 1 "0 by default, will not resize the tree when opening a file -let g:nvim_tree_disable_netrw = 1 "1 by default, disables netrw -let g:nvim_tree_hijack_netrw = 1 "1 by default, prevents netrw from automatically opening when opening directories (but lets you keep its other utilities) +let g:nvim_tree_disable_netrw = 0 "1 by default, disables netrw +let g:nvim_tree_hijack_netrw = 0 "1 by default, prevents netrw from automatically opening when opening directories (but lets you keep its other utilities) let g:nvim_tree_show_icons = { \ 'git': 1, \ 'folders': 1, diff --git a/vim-plug/plugins.vim b/vim-plug/plugins.vim index 4ca5f710..cba8d2f3 100644 --- a/vim-plug/plugins.vim +++ b/vim-plug/plugins.vim @@ -74,6 +74,8 @@ call plug#begin('~/.config/nvim/autoload/plugged') Plug 'glepnir/lspsaga.nvim' Plug 'onsails/lspkind-nvim' Plug 'kosayoda/nvim-lightbulb' + Plug 'mfussenegger/nvim-jdtls' + Plug 'mfussenegger/nvim-dap' " File Explorer Plug 'kyazdani42/nvim-tree.lua' |