✨ feat(nvim): add new extra: yaml-extended
This commit is contained in:
parent
9073b37e68
commit
d2f7619d27
5 changed files with 44 additions and 13 deletions
11
.config/nvim/.github/README.md
vendored
11
.config/nvim/.github/README.md
vendored
|
@ -244,14 +244,6 @@
|
|||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>🔎 Search</b></summary>
|
||||
|
||||
- [jvgrootveld/telescope-zoxide](https://dotfyle.com/plugins/jvgrootveld/telescope-zoxide)
|
||||
- [nvim-telescope/telescope.nvim](https://dotfyle.com/plugins/nvim-telescope/telescope.nvim)
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>🎮 Game</b></summary>
|
||||
|
||||
|
@ -428,6 +420,8 @@
|
|||
<summary><b>🔎 Search</b></summary>
|
||||
|
||||
- [roobert/search-replace.nvim](https://dotfyle.com/plugins/roobert/search-replace.nvim)
|
||||
- [jvgrootveld/telescope-zoxide](https://dotfyle.com/plugins/jvgrootveld/telescope-zoxide)
|
||||
- [nvim-telescope/telescope.nvim](https://dotfyle.com/plugins/nvim-telescope/telescope.nvim)
|
||||
|
||||
</details>
|
||||
|
||||
|
@ -535,6 +529,7 @@
|
|||
- [stevearc/dressing.nvim](https://dotfyle.com/plugins/stevearc/dressing.nvim)
|
||||
- [kevinhwang91/nvim-ufo](https://dotfyle.com/plugins/kevinhwang91/nvim-ufo)
|
||||
- [chrisgrieser/nvim-recorder](https://dotfyle.com/plugins/chrisgrieser/nvim-recorder)
|
||||
- [someone-stole-my-name/yaml-companion.nvim](https://dotfyle.com/plugins/someone-stole-my-name/yaml-companion.nvim)
|
||||
|
||||
</details>
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
"lazyvim.plugins.extras.editor.dial",
|
||||
"lazyvim.plugins.extras.editor.mini-move",
|
||||
"lazyvim.plugins.extras.editor.trouble-v3",
|
||||
"lazyvim.plugins.extras.lang.yaml",
|
||||
"lazyvim.plugins.extras.ui.edgy",
|
||||
"lazyvim.plugins.extras.util.dot",
|
||||
"plugins.extras.coding.ai.codeium",
|
||||
|
@ -42,6 +41,7 @@
|
|||
"plugins.extras.lang.web.html-css",
|
||||
"plugins.extras.lang.web.typescript-extended",
|
||||
"plugins.extras.lang.web.vue",
|
||||
"plugins.extras.lang.yaml-extended",
|
||||
"plugins.extras.lazyvim.bufferline",
|
||||
"plugins.extras.lazyvim.cmp",
|
||||
"plugins.extras.lazyvim.dashboard",
|
||||
|
@ -79,5 +79,4 @@
|
|||
"NEWS.md": "3314"
|
||||
},
|
||||
"version": 3
|
||||
}
|
||||
|
||||
}
|
|
@ -28,7 +28,7 @@ return {
|
|||
"nvim-lualine/lualine.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, 1, require("recorder").displaySlots)
|
||||
table.insert(opts.sections.lualine_x, require("recorder").displaySlots)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
return {
|
||||
{ import = "lazyvim.plugins.extras.lang.yaml" },
|
||||
{ import = "plugins.extras.lang.yaml-extended" },
|
||||
{ import = "lazyvim.plugins.extras.lang.ansible" },
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
|
|
37
.config/nvim/lua/plugins/extras/lang/yaml-extended.lua
Normal file
37
.config/nvim/lua/plugins/extras/lang/yaml-extended.lua
Normal file
|
@ -0,0 +1,37 @@
|
|||
return {
|
||||
{ import = "lazyvim.plugins.extras.lang.yaml" },
|
||||
{
|
||||
"someone-stole-my-name/yaml-companion.nvim",
|
||||
ft = { "yaml" },
|
||||
dependencies = {
|
||||
{ "neovim/nvim-lspconfig" },
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-telescope/telescope.nvim" },
|
||||
},
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
local cfg = require("yaml-companion").setup(opts)
|
||||
require("lspconfig")["yamlls"].setup(cfg)
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("yaml_schema")
|
||||
end)
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>cy", "<cmd>Telescope yaml_schema<cr>", desc = "YAML Schema" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local function yaml_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
|
||||
table.insert(opts.sections.lualine_x, 1, yaml_schema)
|
||||
end,
|
||||
},
|
||||
}
|
Loading…
Add table
Reference in a new issue