update filetypes for yaml languages
This commit is contained in:
@@ -1,27 +1,25 @@
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
['tf'] = 'terraform',
|
||||
},
|
||||
pattern = {
|
||||
['.*/playbooks/.*%.ya?ml'] = 'yaml_ansible',
|
||||
['.*/roles/.*%.ya?ml'] = 'yaml_ansible',
|
||||
['.*/tasks/.*%.ya?ml'] = 'yaml_ansible',
|
||||
['.*/plays/.*%.ya?ml'] = 'yaml_ansible',
|
||||
},
|
||||
})
|
||||
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
j2 = 'jinja',
|
||||
jinja = 'jinja',
|
||||
jinja2 = 'jinja',
|
||||
}
|
||||
})
|
||||
|
||||
vim.filetype.add({
|
||||
pattern = {
|
||||
['%.gitlab%-ci%.ya?ml'] = 'yaml_gitlab',
|
||||
['pipelines/.*%.ya?ml'] = 'yaml_gitlab',
|
||||
},
|
||||
},
|
||||
pattern = {
|
||||
['.*/playbooks/.*%.ya?ml'] = 'yaml.ansible',
|
||||
['.*/roles/.*%.ya?ml'] = 'yaml.ansible',
|
||||
['.*/tasks/.*%.ya?ml'] = 'yaml.ansible',
|
||||
['.*/plays/.*%.ya?ml'] = 'yaml.ansible',
|
||||
-- templates
|
||||
['.*/templates/.*%.ya?ml'] = 'helm',
|
||||
['.*/templates/.*%.tpl'] = 'helm',
|
||||
['helmfile%.ya?ml'] = 'helm',
|
||||
-- values files
|
||||
['.*/helm/.*values.*%.ya?ml'] = 'yaml.helm-values',
|
||||
['values%.ya?ml'] = 'yaml.helm-values',
|
||||
-- gitlab-ci
|
||||
['%.gitlab%-ci%.ya?ml'] = 'yaml.gitlab',
|
||||
['pipelines/.*%.ya?ml'] = 'yaml.gitlab',
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -33,8 +33,6 @@ return {
|
||||
---@type MasonLspconfigSettings
|
||||
require('mason-lspconfig').setup({
|
||||
automatic_enable = true,
|
||||
-- Replace the language servers listed here
|
||||
-- with the ones you want to install
|
||||
ensure_installed = {
|
||||
'ts_ls',
|
||||
'lua_ls',
|
||||
@@ -58,7 +56,7 @@ return {
|
||||
---@type lspconfig.Config
|
||||
vim.lsp.config('pylsp', {
|
||||
settings = {
|
||||
['pylsp'] = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
autopep8 = {
|
||||
enabled = false,
|
||||
@@ -77,13 +75,19 @@ return {
|
||||
|
||||
vim.lsp.config('helm_ls', {
|
||||
settings = {
|
||||
['helm_ls'] = {
|
||||
helmLint = { enabled = false },
|
||||
helm_ls = {
|
||||
yamlls = { enabled = false },
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
vim.lsp.config('yamlls', {
|
||||
filetypes = { 'yaml' },
|
||||
settings = {
|
||||
yaml = { enable = true, },
|
||||
}
|
||||
})
|
||||
|
||||
vim.lsp.config('terraformls', {
|
||||
filetypes = { 'terraform', 'terraform-vars' },
|
||||
-- run terraformls once for a git repo
|
||||
|
||||
@@ -22,7 +22,6 @@ return {
|
||||
"vimdoc",
|
||||
"latex",
|
||||
"json",
|
||||
"yaml",
|
||||
"git_config",
|
||||
"git_rebase",
|
||||
"gitattributes",
|
||||
@@ -43,6 +42,7 @@ return {
|
||||
}
|
||||
ts.setup()
|
||||
ts.install(installed_parsers)
|
||||
vim.treesitter.language.register('yaml', 'yaml_gitlab')
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user