diff options
| author | 2025-03-06 20:54:40 +0300 | |
|---|---|---|
| committer | 2025-03-06 20:54:40 +0300 | |
| commit | 1fa7dd0709e3372dfa9d547a23ea441fdaf32630 (patch) | |
| tree | b9381078e962961beb57a2be3b629ca4d377f631 /lua/config/plugins/completion.lua | |
| parent | feat: add `notify` extension to `telescope` (diff) | |
| download | neovim-configuration-1fa7dd0709e3372dfa9d547a23ea441fdaf32630.tar.gz neovim-configuration-1fa7dd0709e3372dfa9d547a23ea441fdaf32630.tar.bz2 neovim-configuration-1fa7dd0709e3372dfa9d547a23ea441fdaf32630.tar.lz neovim-configuration-1fa7dd0709e3372dfa9d547a23ea441fdaf32630.tar.xz neovim-configuration-1fa7dd0709e3372dfa9d547a23ea441fdaf32630.tar.zst neovim-configuration-1fa7dd0709e3372dfa9d547a23ea441fdaf32630.zip | |
feat: finally working LSP
Diffstat (limited to '')
| -rw-r--r-- | lua/config/plugins/completion.lua | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/lua/config/plugins/completion.lua b/lua/config/plugins/completion.lua index 7fd31c4..5b60993 100644 --- a/lua/config/plugins/completion.lua +++ b/lua/config/plugins/completion.lua @@ -3,7 +3,46 @@ return { "blink.cmp", event = "DeferredUIEnter", after = function(_) - require("blink.cmp").setup({}) + require("blink.cmp").setup({ + appearance = { + use_nvim_cmp_as_default = false, + nerd_font_variant = "mono", + }, + + completion = { + documentation = { + auto_show = true, + auto_show_delay_ms = 500, + }, + + ghost_text = { enabled = true }, + }, + + sources = { default = { "lsp", "path", "snippets", "buffer" } }, + + keymap = { + ["<S-space>"] = { "show", "show_documentation", "hide_documentation" }, + ["<C-e>"] = { "hide", "fallback" }, + ["<CR>"] = { "accept", "fallback" }, + + ["<Tab>"] = { "snippet_forward", "fallback" }, + ["<S-Tab>"] = { "snippet_backward", "fallback" }, + + ["<Up>"] = { "select_prev", "fallback" }, + ["<Down>"] = { "select_next", "fallback" }, + ["<C-p>"] = { "select_prev", "fallback_to_mappings" }, + ["<C-n>"] = { "select_next", "fallback_to_mappings" }, + + ["<C-b>"] = { "scroll_documentation_up", "fallback" }, + ["<C-f>"] = { "scroll_documentation_down", "fallback" }, + }, + }) + + -- NOTE: this is broken due to something + -- local client_capabilities = vim.lsp.protocol.make_client_capabilities() + -- local blink_capabilities = require("blink.cmp").get_lsp_capabilities() + -- local capabilities = vim.tbl_deep_extend('force', client_capabilities, blink_capabilities) + -- vim.lsp.config("*", { capabilities = capabilities }) end, } } |
