Improved yaml behaviour in combination with kubernetes
This commit is contained in:
7
nvim/dot-config/nvim/lua/plugins/kubernetes.lua
Normal file
7
nvim/dot-config/nvim/lua/plugins/kubernetes.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"diogo464/kubernetes.nvim",
|
||||
opts = {
|
||||
schema_strict = true,
|
||||
schema_generate_always = false,
|
||||
},
|
||||
}
|
||||
@@ -1,4 +1,13 @@
|
||||
-- https://github.com/nvim-lualine/lualine.nvim
|
||||
|
||||
local function get_schema()
|
||||
local schema = require("yaml-companion").get_buf_schema(0)
|
||||
if schema.result[1].name == "none" then
|
||||
return ""
|
||||
end
|
||||
return schema.result[1].name
|
||||
end
|
||||
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
opts = {
|
||||
@@ -28,6 +37,7 @@ return {
|
||||
"encoding",
|
||||
{ "fileformat", icons_enabled = false },
|
||||
"filetype",
|
||||
get_schema,
|
||||
},
|
||||
},
|
||||
inactive_sections = {
|
||||
|
||||
11
nvim/dot-config/nvim/lua/plugins/yaml-companion.lua
Normal file
11
nvim/dot-config/nvim/lua/plugins/yaml-companion.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"someone-stole-my-name/yaml-companion.nvim",
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("yaml_schema")
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user