Fix omnisharp language server bits
This commit is contained in:
parent
7603474dc4
commit
4f9bd81546
@ -43,7 +43,7 @@
|
|||||||
environment.variables = {
|
environment.variables = {
|
||||||
EDITOR="nvim";
|
EDITOR="nvim";
|
||||||
PAGER="less -R";
|
PAGER="less -R";
|
||||||
OMNISHARP_BIN = "${pkgs.omnisharp-roslyn}/bin/run";
|
OMNISHARP_BIN = "${pkgs.omnisharp-roslyn}/bin/OmniSharp";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc."nvim.lua" = {
|
environment.etc."nvim.lua" = {
|
||||||
@ -131,6 +131,7 @@
|
|||||||
(tlaplus.override {
|
(tlaplus.override {
|
||||||
adoptopenjdk-bin = jdk;
|
adoptopenjdk-bin = jdk;
|
||||||
})
|
})
|
||||||
|
luajitPackages.lua-lsp
|
||||||
jdk
|
jdk
|
||||||
plantuml-c4
|
plantuml-c4
|
||||||
texlive.combined.scheme-basic
|
texlive.combined.scheme-basic
|
||||||
|
@ -3,29 +3,41 @@
|
|||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
vim.cmd.colorscheme 'duskfox'
|
vim.cmd.colorscheme 'duskfox'
|
||||||
|
|
||||||
|
-- turn on relative line numbers
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
--https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
--https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||||
|
|
||||||
local lsconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
-- Nix language server support
|
-- Nix language server support
|
||||||
lsconfig.nil_ls.setup{}
|
lspconfig.nil_ls.setup{}
|
||||||
|
|
||||||
local vim_pid = vim.fn.pid()
|
local vim_pid = vim.fn.getpid()
|
||||||
|
|
||||||
|
local omnisharp_cmd = { tostring(vim.env.OMNISHARP_BIN), '--languageserver', '--hostPID', tostring(vim_pid) }
|
||||||
-- This needs a path to the omnisharp dll provided. We depend on the OMNISHARP_BIN environment variable being set to make this work.
|
-- This needs a path to the omnisharp dll provided. We depend on the OMNISHARP_BIN environment variable being set to make this work.
|
||||||
lsconfig.omnisharp.setup {
|
lspconfig.omnisharp.setup {
|
||||||
cmd = {
|
cmd = omnisharp_cmd,
|
||||||
omnisharp_bin = { vim.env.OMNISHARP_BIN, '--languageserver', '--hostPID', to_string(vim_pid) },
|
enable_roslyn_analyzers = true,
|
||||||
},
|
enable_editorconfig_support = true,
|
||||||
|
organize_imports_on_format = true,
|
||||||
|
-- Omnisharp has issues with the semanticTokens feature. disable it for this language server.
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
client.server_capabilities.semanticTokensProvider = nil
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Java language server support
|
-- Java language server support
|
||||||
lsconfig.java_language_server.setup{}
|
lspconfig.java_language_server.setup{}
|
||||||
|
|
||||||
-- Typescript language server support
|
-- Typescript language server support
|
||||||
lsconfig.tsserver.setup{}
|
lspconfig.tsserver.setup{}
|
||||||
|
|
||||||
-- Rust language server support
|
-- Rust language server support
|
||||||
lsconfig.rust_analyzer.setup{}
|
lspconfig.rust_analyzer.setup{}
|
||||||
|
|
||||||
|
-- lua language server setup.
|
||||||
|
lspconfig.lua_ls.setup{}
|
||||||
|
|
||||||
-- lsp configuration
|
-- lsp configuration
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
@ -172,6 +184,17 @@ require("nvim-tree").setup{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require('trouble').setup{
|
||||||
|
icons = false,
|
||||||
|
signs = {
|
||||||
|
hint = "➡️",
|
||||||
|
information = "🗒️",
|
||||||
|
warning = "⚠️",
|
||||||
|
error = "🔥",
|
||||||
|
other = "?",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-p>", function()
|
vim.keymap.set("n", "<C-p>", function()
|
||||||
require("nvim-tree.api").tree.toggle()
|
require("nvim-tree.api").tree.toggle()
|
||||||
end)
|
end)
|
||||||
|
6
nix/darwin/flake.lock
generated
6
nix/darwin/flake.lock
generated
@ -34,12 +34,12 @@
|
|||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-YrrxHkALyausm0D+AM11ASh69rin9vjriAiqN/rJyEY=",
|
"narHash": "sha256-HD18bp7KhmwBmkiSS4g6MgdMbxh19lL0o7xJKGh1V7I=",
|
||||||
"path": "/nix/store/2nxf006c1lj38nalx661gpv1c8wc36bq-source/nix/base-system",
|
"path": "/nix/store/a063h2b1fhppg1xc39ccclmlxnalxmk5-source/nix/base-system",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/2nxf006c1lj38nalx661gpv1c8wc36bq-source/nix/base-system",
|
"path": "/nix/store/a063h2b1fhppg1xc39ccclmlxnalxmk5-source/nix/base-system",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user