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 bash
diff diff
html html
fish
git_config
gitignore gitignore
hyprlang
javascript javascript
jsdoc jsdoc
json json
@ -84,6 +87,7 @@ with final.pkgs.lib; let
printf printf
python python
query query
rasi
regex regex
toml toml
tsx tsx
@ -129,14 +133,18 @@ with final.pkgs.lib; let
chafa # fzf-lua chafa # fzf-lua
# Language servers # Language servers
bash-language-server
lua-language-server lua-language-server
nixd nixd
# Linters
biome
shellcheck
# Formatters # Formatters
nodePackages.prettier
shfmt shfmt
stylua stylua
biome
nodePackages.prettier
]; ];
in { in {
# This is the neovim derivation returned by the overlay. # 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, capabilities = capabilities,
}) })
vim.lsp.enable({ 'lua-language-server' }) vim.lsp.enable({ 'bash-language-server', 'lua-language-server' })
-- Keymaps -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Keymaps -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
MarleyVim.lsp.on_attach(function(client) MarleyVim.lsp.on_attach(function(client)

View file

@ -9,6 +9,20 @@ return {
require('lz.n').trigger_load('which-key.nvim') require('lz.n').trigger_load('which-key.nvim')
end, end,
after = function() 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 ---@diagnostic disable-next-line: missing-fields
require('nvim-treesitter.configs').setup({ require('nvim-treesitter.configs').setup({
auto_install = false, auto_install = false,