feat(lsp): hyprland support

This commit is contained in:
2024-10-18 09:48:49 +02:00
parent bb91351c40
commit 9a25573f5d
2 changed files with 16 additions and 0 deletions

View File

@@ -15,6 +15,18 @@ return {
config = function() config = function()
local lsp = require("lsp-zero") local lsp = require("lsp-zero")
-- Hyprlang LSP
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
pattern = { "*.hl", "hypr*.conf" },
callback = function(event)
vim.lsp.start({
name = "hyprlang",
cmd = { "hyprls" },
root_dir = vim.fn.getcwd(),
})
end,
})
lsp.on_attach(function(client, bufnr) lsp.on_attach(function(client, bufnr)
if vim.bo[bufnr].filetype == "markdown" then if vim.bo[bufnr].filetype == "markdown" then
return return

View File

@@ -39,3 +39,7 @@ vim.opt.showmode = false
vim.opt.concealcursor = "n" vim.opt.concealcursor = "n"
vim.opt.conceallevel = 0 vim.opt.conceallevel = 0
vim.g.lsp_zero_ui_float_border = "single" vim.g.lsp_zero_ui_float_border = "single"
vim.filetype.add({
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
})