diff options
author | Jackson Taylor <jtaylor@classicalconversations.com> | 2023-06-01 19:03:46 -0400 |
---|---|---|
committer | Jackson Taylor <jtaylor@classicalconversations.com> | 2023-06-01 19:03:46 -0400 |
commit | 5ddcc445e5abea1162fd1cc1dcc2f7aecc9db6b5 (patch) | |
tree | 69a5c7047c61c9064261a8135e1bc6c750d86343 | |
parent | d606206110261d965f7b5eb9d1dbbfc8eb7d8281 (diff) |
Readd cmp for snippets
Writing markdown became unbearable because anytime I typed "ti", or "th"
it would slow down and freeze for a few seconds. It was really
aggravating. This is what I thought was causing that issue to start
with. This is an area of neovim I really should research more, because
it's a lot more complicated than I thought.
-rw-r--r-- | after/plugin/lsp.lua | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index e19bcaa..0a2c4ff 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -18,22 +18,27 @@ lsp.configure('lua-language-server', { } }) +print('in lsp.lua') +-- will exclude all javascript snippets +-- require("luasnip.loaders.from_vscode").load { +-- exclude = { "markdown" }, +-- } --- local cmp = require('cmp') --- local cmp_select = {behavior = cmp.SelectBehavior.Select} --- local cmp_mappings = lsp.defaults.cmp_mappings({ --- ['<C-p>'] = cmp.mapping.select_prev_item(cmp_select), --- ['<C-n>'] = cmp.mapping.select_next_item(cmp_select), --- ['<C-y>'] = cmp.mapping.confirm({ select = true }), --- ["<C-Space>"] = cmp.mapping.complete(), --- }) +local cmp = require('cmp') +local cmp_select = {behavior = cmp.SelectBehavior.Select} +local cmp_mappings = lsp.defaults.cmp_mappings({ + ['<C-p>'] = cmp.mapping.select_prev_item(cmp_select), + ['<C-n>'] = cmp.mapping.select_next_item(cmp_select), + ['<C-y>'] = cmp.mapping.confirm({ select = true }), + ["<C-Space>"] = cmp.mapping.complete(), +}) --- cmp_mappings['<Tab>'] = nil --- cmp_mappings['<S-Tab>'] = nil +cmp_mappings['<Tab>'] = nil +cmp_mappings['<S-Tab>'] = nil --- lsp.setup_nvim_cmp({ --- mapping = cmp_mappings --- }) +lsp.setup_nvim_cmp({ + mapping = cmp_mappings +}) lsp.set_preferences({ suggest_lsp_servers = false, |