mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-15 06:32:40 +00:00
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:
12
env/.config/hypr/hyprland.conf
vendored
12
env/.config/hypr/hyprland.conf
vendored
@@ -6,12 +6,12 @@
|
|||||||
# Refer to the wiki for more information.
|
# Refer to the wiki for more information.
|
||||||
# https://wiki.hyprland.org/Configuring/
|
# https://wiki.hyprland.org/Configuring/
|
||||||
|
|
||||||
source = ~/.config/hypr/env.conf
|
source = ~/.config/hypr/hyprenv.conf
|
||||||
source = ~/.config/hypr/monitors.conf
|
source = ~/.config/hypr/hyprmonitors.conf
|
||||||
source = ~/.config/hypr/windows.conf
|
source = ~/.config/hypr/hyprwindows.conf
|
||||||
source = ~/.config/hypr/keybinds.conf
|
source = ~/.config/hypr/hyprkeybinds.conf
|
||||||
source = ~/.config/hypr/input.conf
|
source = ~/.config/hypr/hyprinput.conf
|
||||||
source = ~/.config/hypr/autostart.conf
|
source = ~/.config/hypr/hyprautostart.conf
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
### LOOK AND FEEL ###
|
### LOOK AND FEEL ###
|
||||||
|
|||||||
27
env/.config/nvim/init.lua
vendored
27
env/.config/nvim/init.lua
vendored
@@ -30,11 +30,17 @@ require("oil").setup()
|
|||||||
|
|
||||||
-- Set color scheme
|
-- Set color scheme
|
||||||
vim.cmd([[colorscheme catppuccin-mocha]])
|
vim.cmd([[colorscheme catppuccin-mocha]])
|
||||||
|
vim.cmd(":hi statusline guibg=NONE")
|
||||||
vim.cmd [[set completeopt+=menuone,noselect,popup]]
|
vim.cmd [[set completeopt+=menuone,noselect,popup]]
|
||||||
|
|
||||||
-- LSP
|
-- LSP
|
||||||
vim.lsp.enable({
|
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.
|
-- Fix warnings for 'vim' global keyword.
|
||||||
@@ -42,7 +48,9 @@ vim.lsp.config("lua_ls", {
|
|||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
workspace = {
|
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>e', ':Oil<CR>')
|
||||||
map('n', '<leader>f', ':Pick files tool="git"<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>lf', vim.lsp.buf.format)
|
||||||
map('n', '<leader>o', ':update<CR> :source<CR>')
|
map('n', '<leader>o', ':update<CR> :source<CR>')
|
||||||
|
map('n', '<leader>q', ':quit<CR>')
|
||||||
|
map('n', '<leader>w', ':write<CR>')
|
||||||
|
|
||||||
-- Auto commands.
|
-- Auto commands.
|
||||||
local defaultopts = { clear = true }
|
local defaultopts = { clear = true }
|
||||||
@@ -118,3 +129,15 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||||||
end
|
end
|
||||||
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
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user