aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/lsp.lua
diff options
context:
space:
mode:
authorLuca Matei Pintilie <lucafulger@gmail.com>2023-04-10 19:43:30 +0000
committerLuca Matei Pintilie <lucafulger@gmail.com>2023-04-10 19:43:30 +0000
commitc35810e74dab73c7eef14322cebbc9405037c3b0 (patch)
tree3577765706f2c471c4da9d0503f94d3d010902ad /.config/nvim/lua/lsp.lua
parenta8b325d57a8a1084bf6f2bd660773873d174abae (diff)
downloaddotfiles-c35810e74dab73c7eef14322cebbc9405037c3b0.tar
dotfiles-c35810e74dab73c7eef14322cebbc9405037c3b0.tar.gz
dotfiles-c35810e74dab73c7eef14322cebbc9405037c3b0.tar.bz2
dotfiles-c35810e74dab73c7eef14322cebbc9405037c3b0.tar.lz
dotfiles-c35810e74dab73c7eef14322cebbc9405037c3b0.tar.xz
dotfiles-c35810e74dab73c7eef14322cebbc9405037c3b0.tar.zst
dotfiles-c35810e74dab73c7eef14322cebbc9405037c3b0.zip
Bump neovim config to 0.9 and add undotree and test related commands
Diffstat (limited to '')
-rw-r--r--.config/nvim/lua/lsp.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua
index a2207d5..1a828ec 100644
--- a/.config/nvim/lua/lsp.lua
+++ b/.config/nvim/lua/lsp.lua
@@ -91,6 +91,9 @@ local on_attach = function(client, bufnr)
lsp_signature.on_attach({ bind = true }, bufnr)
require("lsp-inlayhints").setup()
require("lsp-inlayhints").on_attach(client, bufnr, false)
+ if client.server_capabilities.semanticTokensProvider then
+ client.server_capabilities.semanticTokensProvider = nil
+ end
end
vim.api.nvim_create_augroup("LspAttach_inlayhints", {})
@@ -293,6 +296,11 @@ vim.lsp.handlers["textDocument/hover"] =
-- Debugging
local dap, dapui = require("dap"), require("dapui")
+dap.adapters.netcoredbg = {
+ type = "executable";
+ command = "netcoredbg";
+ args = { "--interpreter=vscode" };
+}
dapui.setup()
dap.listeners.after.event_initialized["dapui_config"] =
function() dapui.open() end
@@ -300,6 +308,11 @@ dap.listeners.before.event_terminated["dapui_config"] =
function() dapui.close() end
dap.listeners.before.event_exited["dapui_config"] = function() dapui.close() end
+vim.cmd [[ command! TestSingle :lua require("neotest").run.run() ]]
+vim.cmd [[ command! TestFile :lua require("neotest").run.run(vim.fn.expand("%")) ]]
+vim.cmd [[ command! TestDebugSingle :lua require("neotest").run.run({strategy = "dap"}) ]]
+vim.cmd [[ command! TestDebugToggleBreakpoint :DapToggleBreakpoint ]]
+
vim.diagnostic.config({
virtual_text = false;
signs = true;