diff options
Diffstat (limited to '.config/nvim/lua')
| -rw-r--r-- | .config/nvim/lua/custom/config/cmp.lua | 9 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/config/language-servers.lua | 3 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/config/lsp.lua | 23 |
3 files changed, 29 insertions, 6 deletions
diff --git a/.config/nvim/lua/custom/config/cmp.lua b/.config/nvim/lua/custom/config/cmp.lua index 8fbbffd..05a774d 100644 --- a/.config/nvim/lua/custom/config/cmp.lua +++ b/.config/nvim/lua/custom/config/cmp.lua @@ -36,7 +36,14 @@ cmp.setup({ enabled = is_enabled, completion = { completeopt = 'menu,menuone,noinsert' }, sources = cmp.config.sources({ - { name = 'nvim_lsp' }, -- for lsp + { + name = 'nvim_lsp', + option = { + markdown_oxide = { + keyword_pattern = [[\(\k\| \|\/\|#\)\+]], + }, + }, + }, -- for lsp { name = 'luasnip' }, -- for snippets { name = 'lazydev', group_index = 0 }, -- for lazydev.nvim { name = 'path' }, -- for filesystem diff --git a/.config/nvim/lua/custom/config/language-servers.lua b/.config/nvim/lua/custom/config/language-servers.lua index bb9bb09..97c8e30 100644 --- a/.config/nvim/lua/custom/config/language-servers.lua +++ b/.config/nvim/lua/custom/config/language-servers.lua @@ -63,5 +63,6 @@ return { html = true, -- html cssls = true, -- css ts_ls = true, -- javascript/typescript - marksman = true, -- Markdown LSP + -- marksman = true, -- Markdown LSP + markdown_oxide = true, -- Markdown LSP but better } diff --git a/.config/nvim/lua/custom/config/lsp.lua b/.config/nvim/lua/custom/config/lsp.lua index 0c02e46..817b087 100644 --- a/.config/nvim/lua/custom/config/lsp.lua +++ b/.config/nvim/lua/custom/config/lsp.lua @@ -10,10 +10,25 @@ for name, config in pairs(servers) do ---@diagnostic disable-next-line: cast-local-type config = {} end - ---@diagnostic disable-next-line: cast-local-type - config = vim.tbl_deep_extend('force', {}, { - capabilities = capabilities, - }, config) + + -- NOTE: there must be a better way to do it, but it will do for now + if name == 'markdown_oxide' then + ---@diagnostic disable-next-line: cast-local-type + config = vim.tbl_deep_extend('force', {}, { + capabilities = vim.tbl_deep_extend('force', capabilities, { + workspace = { + didChangeWatchedFiles = { + dynamicRegistration = true, + }, + }, + }), + }, config) + else + ---@diagnostic disable-next-line: cast-local-type + config = vim.tbl_deep_extend('force', {}, { + capabilities = capabilities, + }, config) + end lspconfig[name].setup(config) ::continue:: |
