diff --git a/home/dot_config/lvim/lua/user/autocommands.lua b/home/dot_config/lvim/lua/user/autocommands.lua index 50c88c0..9aa93da 100644 --- a/home/dot_config/lvim/lua/user/autocommands.lua +++ b/home/dot_config/lvim/lua/user/autocommands.lua @@ -13,35 +13,49 @@ Last Modified By : Jeff Lance <email@jefflance.me> -- Some examples of autocommands definition through lvim api. -- --- local M = {} +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", --- } --- }, --- } --- end - --- return 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 diff --git a/home/dot_config/lvim/lua/user/plugins.lua b/home/dot_config/lvim/lua/user/plugins.lua index 3f34268..50e4921 100644 --- a/home/dot_config/lvim/lua/user/plugins.lua +++ b/home/dot_config/lvim/lua/user/plugins.lua @@ -42,44 +42,42 @@ M.setup = function() -- chatgpt { "jackMort/ChatGPT.nvim", - event = "VeryLazy", - config = function() - require("chatgpt").setup({ - api_key_cmd = "pass _api_keys/openai_perso-1" - }) - end, - dependencies = { - "MunifTanjim/nui.nvim", - "nvim-lua/plenary.nvim", - "nvim-telescope/telescope.nvim" + event = "VeryLazy", + config = function() + require("chatgpt").setup({ + api_key_cmd = "pass _api_keys/openai_perso-1" + }) + end, + dependencies = { + "MunifTanjim/nui.nvim", + "nvim-lua/plenary.nvim", + "nvim-telescope/telescope.nvim" + } + }, + { + 'xvzc/chezmoi.nvim', + config = function() + require("chezmoi").setup { + -- your configurations + -- default values + { + edit = { + watch = false, + force = false, + }, + notification = { + on_open = true, + on_apply = true, + on_watch = false, + }, + telescope = { + select = { "<CR>" }, + }, } - }, - { - { - 'xvzc/chezmoi.nvim', - dependencies = { 'nvim-lua/plenary.nvim' }, - config = function() - require("chezmoi").setup { - -- your configurations - -- default values - { - edit = { - watch = false, - force = false, - }, - notification = { - on_open = true, - on_apply = true, - on_watch = false, - }, - telescope = { - select = { "<CR>" }, - }, - } - } - end - }, - }, + } + end, + dependencies = { 'nvim-lua/plenary.nvim' }, + }, -- cmp addons { "tzachar/cmp-tabnine",