diff --git a/nvim/lua/myinit.lua b/nvim/lua/myinit.lua index e53a9d3..d668f58 100755 --- a/nvim/lua/myinit.lua +++ b/nvim/lua/myinit.lua @@ -9,5 +9,22 @@ local autocmd = vim.api.nvim_create_autocmd -- 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 diff --git a/nvim/lua/plugins/init.lua b/nvim/lua/plugins/init.lua index c1edbd4..14e1e91 100644 --- a/nvim/lua/plugins/init.lua +++ b/nvim/lua/plugins/init.lua @@ -39,6 +39,9 @@ return { -- shell "shellcheck", + -- Hyprlang + "hyrpls", + -- hdl "rust_hdl", }, @@ -61,6 +64,7 @@ return { "python", "latex", "vhdl", + "hyprlang", }, indent = { enable = true,