✨ feat(nvim): add dot-extended extra to fix the hypr update
This commit is contained in:
parent
f2ec5383f4
commit
c3b12034f0
2 changed files with 37 additions and 3 deletions
|
@ -4,7 +4,6 @@
|
|||
"lazyvim.plugins.extras.lang.python-semshi",
|
||||
"lazyvim.plugins.extras.lang.yaml",
|
||||
"lazyvim.plugins.extras.ui.edgy",
|
||||
"lazyvim.plugins.extras.util.dot",
|
||||
"plugins.extras.coding.ai.codeium",
|
||||
"plugins.extras.coding.ai.gpt",
|
||||
"plugins.extras.coding.annotation",
|
||||
|
@ -78,6 +77,7 @@
|
|||
"plugins.extras.ui.zen-mode",
|
||||
"plugins.extras.util.bigfile",
|
||||
"plugins.extras.util.discordrcp",
|
||||
"plugins.extras.util.dot-extended",
|
||||
"plugins.extras.util.icon-picker",
|
||||
"plugins.extras.util.kitty-scrollback",
|
||||
"plugins.extras.util.vscode",
|
||||
|
@ -87,5 +87,4 @@
|
|||
"NEWS.md": "2123"
|
||||
},
|
||||
"version": 2
|
||||
}
|
||||
|
||||
}
|
35
.config/nvim/lua/plugins/extras/util/dot-extended.lua
Normal file
35
.config/nvim/lua/plugins/extras/util/dot-extended.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
---@type string
|
||||
local xdg_config = vim.env.XDG_CONFIG_HOME or vim.env.HOME .. "/.config"
|
||||
|
||||
---@param path string
|
||||
local function have(path)
|
||||
return vim.loop.fs_stat(xdg_config .. "/" .. path) ~= nil
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
import = "lazyvim.plugins.extras.util.dot",
|
||||
},
|
||||
{
|
||||
"luckasRanarison/tree-sitter-hypr",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"luckasRanarison/tree-sitter-hyprlang",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
if have("hypr") then
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
vim.list_extend(opts.ensure_installed, { "hyprlang" })
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
enabled = function()
|
||||
return have("hypr")
|
||||
end,
|
||||
event = "BufRead */hypr/*.conf",
|
||||
build = ":TSUpdate hyprlang",
|
||||
},
|
||||
}
|
Loading…
Add table
Reference in a new issue