diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2023-11-19 21:57:21 -0500 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2023-11-19 21:57:21 -0500 |
| commit | 1313ecb6f632136c279df3b850d8560d20b28b02 (patch) | |
| tree | c0f67a84865cc987b5e43b801a231aacaa1d4d5b | |
| parent | af8e490bd900626638b5249d9184e83ac2734e53 (diff) | |
| download | nvim-config-1313ecb6f632136c279df3b850d8560d20b28b02.tar.gz nvim-config-1313ecb6f632136c279df3b850d8560d20b28b02.tar.xz | |
Fix configuration issues with updated LSP zero. Bump telescope version.
| -rw-r--r-- | after/plugin/lsp.lua | 45 | ||||
| -rw-r--r-- | init.lua | 6 | ||||
| -rw-r--r-- | plugin/packer_compiled.lua | 4 |
3 files changed, 42 insertions, 13 deletions
diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index 6feb11c..efb6ce9 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -9,7 +9,7 @@ local language_servers = { } local linux_language_servers = { - 'sumneko_lua', + 'lua_ls', 'rust_analyzer', 'clangd', } @@ -20,10 +20,11 @@ if io.popen("uname"):read("*a") == "Linux" then end end -lsp.ensure_installed(language_servers) +-- deprecated +-- lsp.ensure_installed(language_servers) -- Fix Undefined global 'vim' -lsp.configure('sumneko_lua', { +lsp.configure('lua_ls', { settings = { Lua = { diagnostics = { @@ -48,14 +49,23 @@ local cmp_mappings = lsp.defaults.cmp_mappings({ cmp_mappings['<Tab>'] = nil cmp_mappings['<S-Tab>'] = nil -lsp.setup_nvim_cmp({ - preselect = 'none', - mapping = cmp_mappings, - completion = { - completeopt = 'menu,menuone,noinsert,noselect' - } +cmp.setup({ + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert(cmp_mappings) }) +-- Previous setup, this call is now deprecated.... +-- lsp.setup_nvim_cmp({ +-- preselect = 'none', +-- mapping = cmp_mappings, +-- completion = { +-- completeopt = 'menu,menuone,noinsert,noselect' +-- } +-- }) + lsp.set_preferences({ suggest_lsp_servers = false, sign_icons = { @@ -114,3 +124,20 @@ vim.diagnostic.config({ virtual_text = true, }) + +require("mason").setup() +require('mason-lspconfig').setup({ + ensure_installed = {'tsserver', 'rust_analyzer'}, + handlers = { + lsp.default_setup, + tsserver = function() + require('lspconfig').tsserver.setup({ + settings = { + completions = { + completeFunctionCalls = true + } + } + }) + end, + }, +}) @@ -30,8 +30,7 @@ require('packer').startup(function(use) use { - 'nvim-telescope/telescope.nvim', tag = '0.1.0', - -- or , branch = '0.1.x', + 'nvim-telescope/telescope.nvim', tag = '0.1.4', requires = { {'nvim-lua/plenary.nvim'} } } @@ -244,3 +243,6 @@ vim.api.nvim_create_user_command( end, { nargs = 0 } ) + + + diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua index 8b574ee..22965be 100644 --- a/plugin/packer_compiled.lua +++ b/plugin/packer_compiled.lua @@ -49,8 +49,8 @@ local function save_profiles(threshold) end time([[Luarocks path setup]], true) -local package_path_str = "/home/mitch/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/mitch/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/mitch/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/mitch/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/home/mitch/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" +local package_path_str = "/home/mitch/.cache/nvim/packer_hererocks/2.1.1700008891/share/lua/5.1/?.lua;/home/mitch/.cache/nvim/packer_hererocks/2.1.1700008891/share/lua/5.1/?/init.lua;/home/mitch/.cache/nvim/packer_hererocks/2.1.1700008891/lib/luarocks/rocks-5.1/?.lua;/home/mitch/.cache/nvim/packer_hererocks/2.1.1700008891/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/mitch/.cache/nvim/packer_hererocks/2.1.1700008891/lib/lua/5.1/?.so" if not string.find(package.path, package_path_str, 1, true) then package.path = package.path .. ';' .. package_path_str end |
