Skip to content

Commit

Permalink
neovim: add ominisharp and ionide config
Browse files Browse the repository at this point in the history
  • Loading branch information
contrun committed Dec 8, 2023
1 parent bd68f09 commit 92c4037
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
8 changes: 8 additions & 0 deletions dot_config/nvim/lua/lsp/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ function M.common_on_attach(client, bufnr)
bufnnoremap("<leader>ls", "<cmd>Telescope lsp_document_symbols<CR>")
bufnnoremap("<leader>l/", "<cmd>Telescope lsp_workspace_symbols<CR>")

-- https://github.com/neovim/neovim/issues/21391
if client.name == "omnisharp" then
client.server_capabilities.semanticTokensProvider.legend = {
tokenModifiers = { "static" },
tokenTypes = { "comment", "excluded", "identifier", "keyword", "keyword", "number", "operator", "operator", "preprocessor", "string", "whitespace", "text", "static", "preprocessor", "punctuation", "string", "string", "class", "delegate", "enum", "interface", "module", "struct", "typeParameter", "field", "enumMember", "constant", "local", "parameter", "method", "method", "property", "event", "namespace", "label", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "xml", "regexp", "regexp", "regexp", "regexp", "regexp", "regexp", "regexp", "regexp", "regexp" }
}
end

require"lsp-format".on_attach(client)
end

Expand Down
10 changes: 10 additions & 0 deletions dot_config/nvim/lua/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@ return require('packer').startup({
use {"williamboman/mason.nvim"}
use {"williamboman/mason-lspconfig.nvim"}

use {
'ionide/Ionide-vim',
config = function()
-- Don't auto setup fsautocomplte for now, we will set it up with lspconfig,
-- which will also set some useful shortcuts.
vim.g["fsharp#lsp_auto_setup"] = 0
end
}


-- use({'scalameta/nvim-metals', requires = { "nvim-lua/plenary.nvim" }})

use {
Expand Down
6 changes: 4 additions & 2 deletions dot_config/nvim/lua/plugins/lspconfig.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
local get_servers_to_install = function()
local servers_to_install = {
"clangd", "pyright", "jsonls", "dockerls", "rust_analyzer", "elixirls",
"jdtls", "zls", "gopls", "texlab", "rnix", "omnisharp"
"jdtls", "zls", "gopls", "texlab", "rnix"
}
return servers_to_install
end

local get_no_installing_servers = function()
local servers_unable_to_install = {"bashls", "hls", "tsserver", "jsonls"}
local servers_unable_to_install = {
"bashls", "hls", "tsserver", "jsonls", "omnisharp", "fsautocomplete"
}
return servers_unable_to_install
end

Expand Down

0 comments on commit 92c4037

Please sign in to comment.