replace coc with lspconfig

This commit is contained in:
Robert Altner 2025-03-17 12:12:44 +01:00
parent fd48e88cc3
commit 389c1ee2e2
No known key found for this signature in database
GPG key ID: 58794C52DAF9EAD8
4 changed files with 93 additions and 22 deletions

View file

@ -30,6 +30,58 @@ local colors = require("tokyonight.colors").setup()
require("editorconfig").properties.trim_trailing_whitespace = false
require('neoscroll').setup()
require("mason").setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = ""
}
}
})
require("mason-lspconfig").setup()
require("mason-lspconfig").setup_handlers {
-- The first entry (without a key) will be the default handler
-- and will be called for each installed server that doesn't have
-- a dedicated handler.
function (server_name) -- default handler (optional)
require("lspconfig")[server_name].setup {}
end
}
vim.api.nvim_set_keymap("", "<UP>", "<NOP>", {})
vim.api.nvim_set_keymap("", "<DOWn>", "<NOP>", {})
vim.api.nvim_set_keymap("", "<LEFT>", "<NOP>", {})
vim.api.nvim_set_keymap("", "<RIGHT>", "<NOP>", {})
require('goto-preview').setup {
width = 120, -- Width of the floating window
height = 15, -- Height of the floating window
border = {"", "" ,"", "", "", "", "", ""}, -- Border characters of the floating window
default_mappings = false, -- Bind default mappings
debug = false, -- Print debug information
opacity = nil, -- 0-100 opacity level of the floating window where 100 is fully transparent.
resizing_mappings = true, -- Binds arrow keys to resizing the floating window.
post_open_hook = nil, -- A function taking two arguments, a buffer and a window to be ran as a hook.
post_close_hook = nil, -- A function taking two arguments, a buffer and a window to be ran as a hook.
references = { -- Configure the telescope UI for slowing the references cycling window.
provider = "telescope", -- telescope|fzf_lua|snacks|mini_pick|default
telescope = require("telescope.themes").get_dropdown({ hide_preview = false })
},
-- These two configs can also be passed down to the goto-preview definition and implementation calls for one off "peak" functionality.
focus_on_open = true, -- Focus the floating window when opening it.
dismiss_on_move = false, -- Dismiss the floating window when moving the cursor.
force_close = true, -- passed into vim.api.nvim_win_close's second argument. See :h nvim_win_close
bufhidden = "wipe", -- the bufhidden option to set on the floating window. See :h bufhidden
stack_floating_preview_windows = true, -- Whether to nest floating windows
same_file_float_preview = true, -- Whether to open a new floating window for a reference within the current file
preview_window_title = { enable = true, position = "left" }, -- Whether to set the preview window title as the filename
zindex = 1, -- Starting zindex for the stack of floating windows
vim_ui_input = true, -- Whether to override vim.ui.input with a goto-preview floating window
}
require("nvim-tree").setup({
update_focused_file = {
enable = true