aboutsummaryrefslogtreecommitdiff
path: root/modules/neovim/nvim/lua/config/lsp.lua
diff options
context:
space:
mode:
authorStefan Weigl-Bosker <stefan@s00.xyz>2025-04-03 22:30:43 -0400
committerStefan Weigl-Bosker <stefan@s00.xyz>2025-04-03 22:30:43 -0400
commitf1150b73ebaae94c83d15e9def14acf0bbe704d5 (patch)
tree110c54d047eefa8b48128bac6df816e1b21e07de /modules/neovim/nvim/lua/config/lsp.lua
parent21b8b191ec8d7e6d08f53d2be60f60fd4e65efff (diff)
downloadhome-f1150b73ebaae94c83d15e9def14acf0bbe704d5.tar.gz
update
Diffstat (limited to 'modules/neovim/nvim/lua/config/lsp.lua')
-rw-r--r--modules/neovim/nvim/lua/config/lsp.lua85
1 files changed, 0 insertions, 85 deletions
diff --git a/modules/neovim/nvim/lua/config/lsp.lua b/modules/neovim/nvim/lua/config/lsp.lua
deleted file mode 100644
index d0a9827..0000000
--- a/modules/neovim/nvim/lua/config/lsp.lua
+++ /dev/null
@@ -1,85 +0,0 @@
-vim.opt.cot = "menu,menuone,noinsert"
-vim.opt.pumblend=5
-
-local methods = vim.lsp.protocol.Methods
-local map = vim.keymap.set
-
-local servers = {
- clangd = {},
- zls = {},
- rust_analyzer = {}
-}
-
-local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
-function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
- opts = opts or {}
- opts.border = opts.border or "rounded"
- return orig_util_open_floating_preview(contents, syntax, opts, ...)
-end
-
-vim.diagnostic.config({
--- virtual_text = { prefix = "", virt_text_pos = "eol_right_align", },
--- virtual_text = true,
- float = { border = "rounded" },
- signs = false,
- underline = true,
- update_in_insert = false,
- float = true,
- jump = { float = true },
-})
-
--- is completion visible
-local function pumvisible()
- return tonumber(vim.fn.pumvisible()) ~= 0
-end
-
-vim.api.nvim_create_autocmd("LspAttach", { callback = function(args)
- local client = vim.lsp.get_client_by_id(args.data.client_id)
-
- vim.keymap.set('n', 'grr', function()
- vim.lsp.buf.references()
- end, { desc = "Code references (LSP)" })
-
- vim.keymap.set('n', 'gd', function()
- vim.lsp.buf.definition()
- end, { desc = "Goto definition (LSP)" })
-
- if client:supports_method(methods.textDocument_completion) then
- vim.lsp.completion.enable(true, client.id, args.buf, { autotrigger = false })
-
- map('i', "<CR>", function()
- return pumvisible() and '<C-y>' or '<CR>'
- end, { expr = true })
-
-
- -- TODO: this ignores/overwrites default omnifunc rn
- map('i', "<C-n>", function()
- return pumvisible() and '<C-n>' or vim.lsp.completion.trigger()
- end, { expr = true })
-
- map('i', '<Esc>', function()
- return pumvisible() and '<C-E>' or '<Esc>'
- end, { expr = true })
- end
-
- vim.keymap.set('n', 'E', '<cmd>lua vim.lsp.buf.hover()<CR>', { silent = true })
- -- if client:supports_method(methods.textDocument_inlayHint) then
- -- vim.lsp.inlay_hint.enable()
- -- end
-
- if client:supports_method(methods.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})
-
-local lspconfig = require('lspconfig')
-
-for server, config in pairs(servers) do
--- config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities)
- lspconfig[server].setup({})
-end