feat: Dotfile support

This commit is contained in:
punkfairie 2025-01-04 16:29:32 -08:00
parent 2b9aa3829f
commit ddd018042e
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
4 changed files with 36 additions and 3 deletions

View file

@ -69,7 +69,10 @@ with final.pkgs.lib; let
bash
diff
html
fish
git_config
gitignore
hyprlang
javascript
jsdoc
json
@ -84,6 +87,7 @@ with final.pkgs.lib; let
printf
python
query
rasi
regex
toml
tsx
@ -129,14 +133,18 @@ with final.pkgs.lib; let
chafa # fzf-lua
# Language servers
bash-language-server
lua-language-server
nixd
# Linters
biome
shellcheck
# Formatters
nodePackages.prettier
shfmt
stylua
biome
nodePackages.prettier
];
in {
# This is the neovim derivation returned by the overlay.

View file

@ -0,0 +1,11 @@
return {
filetypes = { 'bash', 'sh' },
cmd = { 'bash-language-server', 'start' },
root_markers = { '.git' },
settings = {
bashIde = {
globPattern = vim.env.GLOB_PATTERN or '*@(.sh|.inc|.bash|.command)',
},
},
}

View file

@ -79,7 +79,7 @@ vim.lsp.config('*', {
capabilities = capabilities,
})
vim.lsp.enable({ 'lua-language-server' })
vim.lsp.enable({ 'bash-language-server', 'lua-language-server' })
-- Keymaps -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
MarleyVim.lsp.on_attach(function(client)

View file

@ -9,6 +9,20 @@ return {
require('lz.n').trigger_load('which-key.nvim')
end,
after = function()
vim.filetype.add({
extension = { rasi = 'rasi', rofi = 'rasi', wofi = 'rasi' },
pattern = {
['.*/waybar/config'] = 'jsonc',
['.*/mako/config'] = 'dosini',
['.*/kitty/.+%.conf'] = 'kitty',
['.*/hypr/.+*.conf'] = 'hyprlang',
['%.env%.[%w_.-]+'] = 'sh',
},
})
-- Use the bash parser for kitty files.
vim.treesitter.language.register('bash', 'kitty')
---@diagnostic disable-next-line: missing-fields
require('nvim-treesitter.configs').setup({
auto_install = false,