diff options
Diffstat (limited to 'after/plugin/lsp.lua')
-rw-r--r-- | after/plugin/lsp.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index a923813..a438d00 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -21,6 +21,9 @@ lsp.configure('lua-language-server', { } }) +-- require("luasnip.loaders.from_vscode").lazy_load({ paths = { "./my-cool-snippets" } }) +require("luasnip.loaders.from_vscode").lazy_load({paths = {"~/snippets"}}) + -- Autocomplettion engine setup -- This is the drop downs that come up local cmp = require('cmp') @@ -48,8 +51,10 @@ lsp.setup_nvim_cmp({ -- I feel like what I'm writing is, more often than not, something I've already written so I don't mind scrolling down in the list if I have to make a function or actually use one of the snippets. sources = { {name = 'buffer'}, -- words found in your buffer (cmp-buffer) - {name = 'nvim_lsp'}, -- everything the language server finds (neovim/nvim-lspconfig) + -- {name = 'nvim_lsp'}, -- everything the language server finds (neovim/nvim-lspconfig) + { name = 'nvim_lsp', max_item_count = 10, keyword_length = 4 }, {name = 'luasnip'}, -- custom/popular snippets for languages (L3MON4D3/LuaSnip and rafamadriz/friendly-snippets) + {name = 'cmd_luasnip'}, -- custom/popular snippets for languages (L3MON4D3/LuaSnip and rafamadriz/friendly-snippets) } }) @@ -81,6 +86,6 @@ end) lsp.setup() vim.diagnostic.config({ - virtual_text = true + virtual_text = true }) |