1
0
Files
chezmoi/home/dot_config/lvim/lua/user/autocommands.lua
Jeff LANCE 4813dd044f Update home/.config/lvim/lua/user/autocommands.lua
Update home/.config/lvim/lua/user/plugins.lua
2025-03-15 19:58:33 +01:00

62 lines
1.4 KiB
Lua

--[[--
File : conf.d/lvim/lua/user/autocommands.lua
Author : Jeff Lance <email@jefflance.me>
Date : 23.02.2024 16:47:36
Last Modified Date: 23.02.2024 16:47:36
Last Modified By : Jeff Lance <email@jefflance.me>
--]]--
-- Set autocommands
--
-- Some examples of autocommands definition through lvim api.
--
local M = {}
M.setup = function()
lvim.autocommands = {
-- -- for any files
-- {
-- { "VimEnter" },
-- {
-- pattern = { "*" },
-- command = "FloatermNew --width=0.8 --name=terminal --cwd=<buffer>",
-- }
-- },
-- -- arduino files
-- {
-- { "BufNewFile", "BufRead" },
-- {
-- pattern = { "*.ino", ".pde" },
-- command = "set filetype=arduino",
-- }
-- },
-- -- asymptote filetype
-- {
-- { "BufNewFile", "BufRead" },
-- {
-- pattern = { "*.asy" },
-- command = "set filetype=asy",
-- }
-- },
-- Hyprlang LSP
{
{'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
}
},
}
end
return M