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

@ -7,43 +7,43 @@ end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath) vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({ require("lazy").setup({
spec = { spec = {
-- add LazyVim and import its plugins -- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" }, { "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here -- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.json" }, -- { import = "lazyvim.plugins.extras.ui.mini-animate" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" }, { import = "lazyvim.plugins.extras.coding.copilot" },
{ import = "lazyvim.plugins.extras.coding.copilot" }, { import = "lazyvim.plugins.extras.lang.go" },
{ import = "lazyvim.plugins.extras.lang.go" }, { import = "lazyvim.plugins.extras.lang.json" },
{ import = "lazyvim.plugins.extras.lang.typescript" }, { import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.yaml" }, { import = "lazyvim.plugins.extras.lang.yaml" },
-- import/override with your plugins -- import/override with your plugins
{ import = "plugins" }, { import = "plugins" },
}, },
defaults = { defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false, lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning, -- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install. -- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver -- version = "*", -- try installing the latest stable version for plugins that support semver
}, },
install = { colorscheme = { "noirbuddy", "tokyonight", "habamax" } }, install = { colorscheme = { "noirbuddy", "tokyonight", "habamax" } },
checker = { enabled = true }, -- automatically check for plugin updates checker = { enabled = true }, -- automatically check for plugin updates
performance = { performance = {
rtp = { rtp = {
-- disable some rtp plugins -- disable some rtp plugins
disabled_plugins = { disabled_plugins = {
"gzip", "gzip",
-- "matchit", -- "matchit",
-- "matchparen", -- "matchparen",
-- "netrwPlugin", -- "netrwPlugin",
"tarPlugin", "tarPlugin",
"tohtml", "tohtml",
"tutor", "tutor",
"zipPlugin", "zipPlugin",
}, },
}, },
}, },
}) })

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,
},
}