Adds nvim config as home manager module

This commit is contained in:
Dennis Schoepf 2025-01-24 21:49:07 +01:00
parent 5a9ad9bbd1
commit 98f4a6679e
34 changed files with 1260 additions and 0 deletions

View file

@ -0,0 +1,39 @@
-- Highlight on yank
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
vim.api.nvim_create_autocmd("TextYankPost", {
callback = function()
vim.highlight.on_yank()
end,
group = highlight_group,
pattern = "*",
})
local function filter(arr, fn)
if type(arr) ~= "table" then
return arr
end
local filtered = {}
for k, v in pairs(arr) do
if fn(v, k, arr) then
table.insert(filtered, v)
end
end
return filtered
end
local function filterReactDTS(value)
-- Depending on typescript version either uri or targetUri is returned
if value.uri then
return string.match(value.uri, "%.d.ts") == nil
elseif value.targetUri then
return string.match(value.targetUri, "%.d.ts") == nil
end
end
return {
filter = filter,
filterReactDTS = filterReactDTS,
}