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 c90473b commit 39b30b9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion dot_config/nvim/lua/plugins/lspconfig.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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", "omnisharp", "fsautocomplete"
}
return servers_to_install
end
Expand Down

0 comments on commit 39b30b9

Please sign in to comment.