chore(nvim): updated config

This commit is contained in:
Afonso Franco 2024-03-30 16:08:40 +00:00
parent d1f612bf79
commit e40e156d85
Signed by: afonso
SSH key fingerprint: SHA256:gkVPzsQQJzqi21ntQBV6pXTx4bYI53rFGI4XtvCpwd4
5 changed files with 45 additions and 29 deletions

View file

@ -0,0 +1,5 @@
augroup SageDetect
au!
au BufRead,BufNewFile *sage set ft=python
augroup END

View file

@ -19,14 +19,6 @@ if not lspkind_status_ok then
return
end
cmp.event:on("menu_opened", function()
vim.b.copilot_suggestion_hidden = true
end)
cmp.event:on("menu_closed", function()
vim.b.copilot_suggestion_hidden = false
end)
-- 󰃐 󰆩 󰙅 󰛡  󰅲 some other good icons
local kind_icons = {
Text = "󰉿",

View file

@ -4,8 +4,5 @@ require("conform").setup({
javascript = { "prettierd" },
markdown = { "mdformat" },
json = {"jq"}
},
format_on_save = {
lsp_fallback = true,
},
}
})

View file

@ -156,7 +156,7 @@ lazy.setup({
{
"rcarriga/nvim-dap-ui",
event = "VeryLazy",
dependencies = "mfussenegger/nvim-dap",
dependencies = {"mfussenegger/nvim-dap","nvim-neotest/nvim-nio"},
config = function()
local dap = require("dap")
local dapui = require("dapui")
@ -220,11 +220,13 @@ lazy.setup({
end,
},
{
"mrcjkb/rustaceanvim",
version = "^4", -- Recommended
ft = { "rust" },
},
'tpope/vim-commentary',
-- {
-- "mrcjkb/rustaceanvim",
-- version = "^4", -- Recommended
-- ft = { "rust" },
-- },
"barreiroleo/ltex-extra.nvim",

View file

@ -15,6 +15,9 @@ vim.api.nvim_create_autocmd("LspAttach", {
local telescope = require("telescope.builtin")
local conform = require("conform")
local client = vim.lsp.get_client_by_id(ev.data.client_id)
client.server_capabilities.semanticTokensProvider = nil
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap = true, silent = true, buffer = ev.buf }
@ -62,12 +65,6 @@ mason_lspconfig.setup_handlers({
},
})
end,
["hls"] = function()
lspconfig["hls"].setup({
capabilities = capabilities,
filetypes = { 'haskell', 'lhaskell', 'cabal' },
})
end,
["ltex"] = function()
lspconfig["ltex"].setup({
capabilities = capabilities,
@ -77,15 +74,38 @@ mason_lspconfig.setup_handlers({
require("ltex_extra").setup()
end,
})
end,
["basedpyright"] = function ()
lspconfig["basedpyright"].setup({
capabilities = capabilities,
settings = {
verboseOutput = true,
autoImportCompletion = true,
basedpyright = {
analysis = {
typeCheckingMode = "all",
autoSearchPaths = true,
useLibraryCodeForTypes = true,
diagnosticMode = "openFilesOnly",
indexing = true,
},
},
},
})
end
})
lspconfig["hls"].setup({
capabilities = capabilities,
filetypes = { 'haskell', 'lhaskell', 'cabal' },
})
vim.g.rustaceanvim = {
server = {
capabilities = capabilities,
},
}
--vim.g.rustaceanvim = {
-- server = {
-- capabilities = capabilities,
-- },
--}