mirror of
https://github.com/TheM1Stery/dotfiles.git
synced 2025-04-20 00:51:11 +00:00
refactor: move vim.filetype.add to lsp.lua
This commit is contained in:
parent
3c718631f0
commit
09f83ea29d
@ -43,8 +43,22 @@ return {
|
||||
'ray-x/go.nvim',
|
||||
},
|
||||
config = function()
|
||||
-- unknown filetypes(needed for some lsp servers)
|
||||
vim.filetype.add {
|
||||
pattern = {
|
||||
['.*/hypr/.*%.conf'] = 'hyprlang',
|
||||
['openapi.*%.ya?ml'] = 'yaml.openapi',
|
||||
['openapi.*%.json'] = 'json.openapi',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
local lsp = require("lsp-zero")
|
||||
|
||||
lsp.configure('yamlls', {
|
||||
filetypes = { 'yaml', 'yaml.openapi' }
|
||||
})
|
||||
|
||||
lsp.configure('csharp_ls', {
|
||||
handlers = {
|
||||
["textDocument/definition"] = require("csharpls_extended").handler,
|
||||
@ -207,7 +221,7 @@ return {
|
||||
|
||||
local gopls_opts = require("go.lsp").config()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { 'tsserver', 'svelte', 'lua_ls', 'csharp_ls', 'rust_analyzer', 'gopls' },
|
||||
ensure_installed = { 'ts_ls', 'svelte', 'lua_ls', 'csharp_ls', 'rust_analyzer', 'gopls' },
|
||||
handlers = {
|
||||
lsp.default_setup,
|
||||
lua_ls = function()
|
||||
|
@ -30,11 +30,6 @@ return {
|
||||
}
|
||||
}
|
||||
require('rainbow-delimiters.setup').setup()
|
||||
vim.filetype.add {
|
||||
pattern = {
|
||||
['.*/hypr/.*%.conf'] = 'hyprlang'
|
||||
}
|
||||
}
|
||||
end
|
||||
},
|
||||
-- "nvim-treesitter/nvim-treesitter-context"
|
||||
|
Loading…
Reference in New Issue
Block a user