nvim: yaml schema goodness

This commit is contained in:
Daniel Lundin 2023-09-18 00:45:46 +02:00
parent 3923b20519
commit 251539979e
2 changed files with 64 additions and 39 deletions

View file

@ -11,10 +11,10 @@ require("lazy").setup({
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
{ import = "lazyvim.plugins.extras.coding.copilot" },
{ import = "lazyvim.plugins.extras.lang.go" },
{ import = "lazyvim.plugins.extras.lang.json" },
{ import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.yaml" },
-- import/override with your plugins

View file

@ -0,0 +1,25 @@
return {
{
"someone-stole-my-name/yaml-companion.nvim",
dependencies = {
{ "neovim/nvim-lspconfig" },
{ "nvim-lua/plenary.nvim" },
{ "nvim-telescope/telescope.nvim" },
},
config = function()
require("yaml-companion").setup()
require("telescope").load_extension("yaml_schema")
local cfg = require("yaml-companion").setup({
-- Add any options here, or leave empty to use the default settings
-- Additional schemas available in Telescope picker
schemas = {
{
name = "Kubernetes 1.25.9",
uri = "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.9-standalone-strict/all.json",
},
},
})
require("lspconfig")["yamlls"].setup(cfg)
end,
},
}