diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index f8eacae..e023407 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,5 +1,5 @@ { - "blink.cmp": { "branch": "main", "commit": "485c03400608cb6534bbf84da8c1c471fc4808c0" }, + "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, "fzf-lua": { "branch": "main", "commit": "edf3524164c0878e64968cb1d4a24ba695b1ee12" }, "fzf-lua-frecency.nvim": { "branch": "master", "commit": "0bb73d45983b65ac50bca30eb170cef3223939de" }, diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 8bd4992..ec4103e 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -100,9 +100,22 @@ return require("lazy").setup({ -- {{{ IntelliSense { "https://github.com/Saghen/blink.cmp", - version = "v0.*", + dependencies = { + "https://github.com/neovim/nvim-lspconfig", + }, + version = "1.*", event = "VeryLazy", config = function() + vim.lsp.enable({ + "gopls", + "lua_ls", + "nil_ls", + "pyright", + "rust_analyzer", + "terraformls", + "ts_ls", + }) + require("blink.cmp").setup({ keymap = { preset = "enter", @@ -116,33 +129,6 @@ return require("lazy").setup({ end, }, - { - "https://github.com/neovim/nvim-lspconfig", - event = "VeryLazy", - config = function() - -- Requires language servers to be already installed - -- :help lspconfig-all - local servers = { - gopls = {}, - lua_ls = {}, - nil_ls = {}, - pyright = {}, - rust_analyzer = {}, - terraformls = {}, - ts_ls = {}, - } - - local lspconfig = require("lspconfig") - for server, config in pairs(servers) do - config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities) - lspconfig[server].setup(config) - end - - -- HACK manually start LSP server after lazy load - vim.cmd("filetype detect") - end, - }, - -- TODO refactor when Tree-sitter is stable and merged to nvim core -- https://github.com/nvim-treesitter/nvim-treesitter/issues/4767 {