aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/lsp.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/lsp.lua')
-rw-r--r--.config/nvim/lua/lsp.lua77
1 files changed, 10 insertions, 67 deletions
diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua
index 5e8ddf8..4c8ab62 100644
--- a/.config/nvim/lua/lsp.lua
+++ b/.config/nvim/lua/lsp.lua
@@ -281,7 +281,9 @@ require("lspconfig").lua_ls.setup({
};
})
-require("lspconfig").jedi_language_server.setup({})
+require("lspconfig").jdtls.setup({})
+
+require('lspconfig').jedi_language_server.setup({})
local null_ls = require("null-ls")
@@ -311,75 +313,16 @@ null_ls.setup({
local dap, dapui = require("dap"), require("dapui")
dapui.setup()
-dap.listeners.after.event_initialized["dapui_config"] =
- function() dapui.open() end
-dap.listeners.before.event_terminated["dapui_config"] =
- function() dapui.close() end
-dap.listeners.before.event_exited["dapui_config"] = function() dapui.close() end
-
-dap.adapters.coreclr = {
- type = "executable";
- command = "netcoredbg";
- args = { "--interpreter=vscode" };
-}
-
-vim.g.dotnet_build_project = function()
- local default_path = vim.fn.getcwd() .. "/"
- if vim.g["dotnet_last_proj_path"] ~= nil then
- default_path = vim.g["dotnet_last_proj_path"]
- end
- local path = vim.fn.input("Path to your *proj file", default_path, "file")
- vim.g["dotnet_last_proj_path"] = path
- local cmd = "dotnet build -c Debug " .. path .. " > /dev/null"
- print("")
- print("Cmd to execute: " .. cmd)
- local f = os.execute(cmd)
- if f == 0 then
- print("\nBuild: ✔️ ")
- else
- print("\nBuild: ❌ (code: " .. f .. ")")
- end
+dap.listeners.after.event_initialized["dapui_config"] = function()
+ dapui.open()
end
-
-vim.g.dotnet_get_dll_path = function()
- local request = function()
- return vim.fn.input("Path to dll", vim.fn.getcwd() .. "/bin/Debug/", "file")
- end
-
- if vim.g["dotnet_last_dll_path"] == nil then
- vim.g["dotnet_last_dll_path"] = request()
- else
- if vim.fn.confirm("Do you want to change the path to dll?\n" ..
- vim.g["dotnet_last_dll_path"], "&yes\n&no", 2) == 1 then
- vim.g["dotnet_last_dll_path"] = request()
- end
- end
-
- return vim.g["dotnet_last_dll_path"]
+dap.listeners.before.event_terminated["dapui_config"] = function()
+ dapui.close()
+end
+dap.listeners.before.event_exited["dapui_config"] = function()
+ dapui.close()
end
-dap.configurations.cs = {
- {
- type = "coreclr";
- name = "launch - netcoredbg";
- request = "launch";
- program = function()
- if vim.fn.confirm("Should I recompile first?", "&yes\n&no", 2) == 1 then
- vim.g.dotnet_build_project()
- end
- return vim.g.dotnet_get_dll_path()
- end;
- };
- {
- -- If you get an "Operation not permitted" error using this, try disabling YAMA:
- -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
- name = "Attach to process";
- type = "cs";
- request = "attach";
- pid = require("dap.utils").pick_process;
- args = {};
- };
-}
vim.diagnostic.config({
virtual_text = false;