add yaml support

This commit is contained in:
Philipp Thaler 2026-02-12 22:33:32 +01:00
parent 4407936dfd
commit b5c87892f7
1 changed files with 14 additions and 1 deletions

View File

@ -601,6 +601,7 @@ require('lazy').setup({
-- gopls = {}, -- gopls = {},
-- pyright = {}, -- pyright = {},
-- rust_analyzer = {}, -- rust_analyzer = {},
-- --
-- Some languages (like typescript) have entire language plugins that can be useful: -- Some languages (like typescript) have entire language plugins that can be useful:
-- https://github.com/pmizio/typescript-tools.nvim -- https://github.com/pmizio/typescript-tools.nvim
@ -620,6 +621,7 @@ require('lazy').setup({
vim.list_extend(ensure_installed, { vim.list_extend(ensure_installed, {
'lua-language-server', -- Lua Language server 'lua-language-server', -- Lua Language server
'stylua', -- Used to format Lua code 'stylua', -- Used to format Lua code
'yaml-language-server',
-- You can add other tools here that you want Mason to install -- You can add other tools here that you want Mason to install
}) })
@ -630,7 +632,17 @@ require('lazy').setup({
vim.lsp.config(name, server) vim.lsp.config(name, server)
vim.lsp.enable(name) vim.lsp.enable(name)
end end
vim.lsp.config('yamlls', {
settings = {
yaml = {
schemas = {
['https://json.schemastore.org/github-workflow.json'] = '/.github/workflows/*',
['../path/relative/to/file.yml'] = '/.github/workflows/*',
['/path/from/root/of/project'] = '/.github/workflows/*',
},
},
},
})
-- Special Lua Config, as recommended by neovim help docs -- Special Lua Config, as recommended by neovim help docs
vim.lsp.config('lua_ls', { vim.lsp.config('lua_ls', {
on_init = function(client) on_init = function(client)
@ -656,6 +668,7 @@ require('lazy').setup({
Lua = {}, Lua = {},
}, },
}) })
vim.lsp.enable 'yamlls'
vim.lsp.enable 'lua_ls' vim.lsp.enable 'lua_ls'
end, end,
}, },