mirror of
https://github.com/Derisis13/dotfiles.git
synced 2025-12-06 19:32:50 +01:00
31 lines
787 B
Lua
Executable File
31 lines
787 B
Lua
Executable File
local autocmd = vim.api.nvim_create_autocmd
|
|
|
|
-- Auto resize panes when resizing nvim window
|
|
-- autocmd("VimResized", {
|
|
-- pattern = "*",
|
|
-- command = "tabdo wincmd =",
|
|
-- })
|
|
|
|
-- Auto unfold all when entering a buffer
|
|
autocmd("BufWinEnter", { pattern = "*", command = "silent! :%foldopen!" })
|
|
|
|
-- Hyrplang filetype
|
|
vim.filetype.add({
|
|
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
|
|
})
|
|
-- Hyprlang LSP
|
|
autocmd({'BufEnter', 'BufWinEnter'}, {
|
|
pattern = {"*.hl", "hypr*.conf"},
|
|
callback = function(event)
|
|
print(string.format("starting hyprls for %s", vim.inspect(event)))
|
|
vim.lsp.start {
|
|
name = "hyprlang",
|
|
cmd = {"hyprls"},
|
|
root_dir = vim.fn.getcwd(),
|
|
}
|
|
end
|
|
})
|
|
|
|
vim.g.vscode_snippets_path = "~/.config/nvim/snippets"
|
|
vim.opt.relativenumber = true
|