feat: Nvim config updates, renames hyprland config files to have a 'hypr' prefix for hypr lsp to work on them.

This commit is contained in:
2025-11-08 14:05:08 -05:00
parent e154efcac4
commit 3081c6b9b3
9 changed files with 31 additions and 8 deletions

View File

@@ -6,12 +6,12 @@
# Refer to the wiki for more information.
# https://wiki.hyprland.org/Configuring/
source = ~/.config/hypr/env.conf
source = ~/.config/hypr/monitors.conf
source = ~/.config/hypr/windows.conf
source = ~/.config/hypr/keybinds.conf
source = ~/.config/hypr/input.conf
source = ~/.config/hypr/autostart.conf
source = ~/.config/hypr/hyprenv.conf
source = ~/.config/hypr/hyprmonitors.conf
source = ~/.config/hypr/hyprwindows.conf
source = ~/.config/hypr/hyprkeybinds.conf
source = ~/.config/hypr/hyprinput.conf
source = ~/.config/hypr/hyprautostart.conf
#####################
### LOOK AND FEEL ###

View File

@@ -30,11 +30,17 @@ require("oil").setup()
-- Set color scheme
vim.cmd([[colorscheme catppuccin-mocha]])
vim.cmd(":hi statusline guibg=NONE")
vim.cmd [[set completeopt+=menuone,noselect,popup]]
-- LSP
vim.lsp.enable({
"lua_ls", "tinymist", "marksman"
"lua_ls", "tinymist", "marksman", "bashls", "hyprls",
})
vim.lsp.config('bashls', {
filetypes = { "bash", "sh", "zsh" },
cmd = { 'bash-language-server', 'start' },
})
-- Fix warnings for 'vim' global keyword.
@@ -42,7 +48,9 @@ vim.lsp.config("lua_ls", {
settings = {
Lua = {
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
library = {
vim.api.nvim_get_runtime_file("", true),
},
},
},
},
@@ -53,8 +61,11 @@ local map = vim.keymap.set
map('n', '<leader>e', ':Oil<CR>')
map('n', '<leader>f', ':Pick files tool="git"<CR>')
map('n', '<leader>h', ':Pick help<CR>')
map('n', '<leader>lf', vim.lsp.buf.format)
map('n', '<leader>o', ':update<CR> :source<CR>')
map('n', '<leader>q', ':quit<CR>')
map('n', '<leader>w', ':write<CR>')
-- Auto commands.
local defaultopts = { clear = true }
@@ -118,3 +129,15 @@ vim.api.nvim_create_autocmd('LspAttach', {
end
end,
})
-- 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
})