diff options
| author | Marcelo <setanta@gmail.com> | 2025-03-30 04:26:45 -0300 |
|---|---|---|
| committer | Marcelo <setanta@gmail.com> | 2025-04-04 00:10:23 -0300 |
| commit | 43af656a9e1325e76c69e6f5e694214156c278f1 (patch) | |
| tree | 9c44dbd5842107b662bd5795d238ace98677e648 /lua/config/plugins | |
| parent | 7eec86e74ffb085d48da574b02af12bce3f73d93 (diff) | |
Replace nvim-lspconfig and blink completion with NVIM 0.11 native options.
Diffstat (limited to 'lua/config/plugins')
| -rw-r--r-- | lua/config/plugins/completion.lua | 29 | ||||
| -rw-r--r-- | lua/config/plugins/lsp.lua | 106 |
2 files changed, 0 insertions, 135 deletions
diff --git a/lua/config/plugins/completion.lua b/lua/config/plugins/completion.lua deleted file mode 100644 index f8cc602..0000000 --- a/lua/config/plugins/completion.lua +++ /dev/null @@ -1,29 +0,0 @@ -return { - { - "saghen/blink.cmp", - dependencies = "rafamadriz/friendly-snippets", - - version = "v0.13.1", - - opts = { - keymap = { - preset = "default", - -- The default `<C-Space>` is my tmux prefix. - ["<M-Space>"] = { "show", "show_documentation", "hide_documentation" }, - }, - - appearance = { - use_nvim_cmp_as_default = true, - nerd_font_variant = 'mono' - }, - - sources = { - min_keyword_length = 2, - default = { "lsp", "path", "snippets", "buffer" }, - }, - - signature = { enabled = true }, - }, - opts_extend = { "sources.default" } - } -} diff --git a/lua/config/plugins/lsp.lua b/lua/config/plugins/lsp.lua deleted file mode 100644 index 16e785d..0000000 --- a/lua/config/plugins/lsp.lua +++ /dev/null @@ -1,106 +0,0 @@ -return { - { - "neovim/nvim-lspconfig", - dependencies = { - "saghen/blink.cmp", - }, - opts = { - servers = { - clangd = { - cmd = { - "clangd", - "--header-insertion=iwyu", - "--background-index", - "--clang-tidy", - "--log=verbose", - }, - filetypes = { "c", "cpp", "objc", "objcpp", "cuda", "proto" }, - single_file_support = true, - }, - cssls = {}, - html = {}, - jsonls = {}, - lua_ls = { - settings = { - Lua = { - runtime = { - version = "LuaJIT", - }, - diagnostics = { - globals = { - "vim", - "require", - }, - }, - workspace = { - library = vim.api.nvim_get_runtime_file("", true), - }, - telemetry = { - enable = false, - }, - }, - }, - }, - marksman = {}, - solargraph = { - cmd = { - vim.fn.expand('~/.local/share/nvim/mason/bin/solargraph'), - 'stdio', - }, - }, - ts_ls = {}, - }, - }, - - config = function(_, opts) - local lspconfig = require("lspconfig") - local blink = require("blink.cmp") - - for server, config in pairs(opts.servers) do - config.capabilities = blink.get_lsp_capabilities() - lspconfig[server].setup(config) - end - - vim.api.nvim_create_autocmd("LspAttach", { - callback = function(args) - local client = vim.lsp.get_client_by_id(args.data.client_id) - if not client then return end - - vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "Jumps to definition", buffer = args.buf }) - vim.keymap.set("n", "gD", vim.lsp.buf.declaration, { desc = "Jumps to declaration", buffer = args.buf }) - vim.keymap.set("n", "gi", vim.lsp.buf.implementation, { desc = "Lists all implementations", buffer = args.buf }) - - vim.keymap.set("n", "<Leader>cf", function() vim.lsp.buf.format({ async = true, buffer = args.buf }) end, - { desc = "Formats a buffer", buffer = args.buf }) - vim.keymap.set("v", "<C-f>", function() vim.lsp.buf.format({ async = true, buffer = args.buf }) end, - { desc = "Formats a buffer", buffer = args.buf }) - - -- Disabled, kept temporarily here just for reference - if false and vim.bo.filetype == "lua" then - if client.supports_method("textDocument/formatting") then - vim.api.nvim_create_autocmd("BufWritePre", { - buffer = args.buf, - callback = function() - vim.lsp.buf.format({ bufnr = args.buf, id = client.id }) - end, - }) - end - end - end - }) - - vim.diagnostic.config({ - underline = true, - virtual_text = { prefix = " ●", }, - signs = { - text = { - [vim.diagnostic.severity.ERROR] = "", - [vim.diagnostic.severity.WARN] = "", - [vim.diagnostic.severity.INFO] = "", - [vim.diagnostic.severity.HINT] = "", - }, - }, - }) - end, - }, -} |
