include i3 and nvim configuration in the central repository, rather than keep them in their seperate respective ones.

This commit is contained in:
2025-11-19 10:06:30 +01:00
parent 9ece4e28de
commit ab5ff2bffc
41 changed files with 1409 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
---@module 'lazy'
---@type LazySpec
return { {
'stevearc/conform.nvim', -- allows you to format a buffer
event = { 'BufWritePre' },
cmd = { 'ConformInfo' },
keys = {
{
'<leader>f',
function()
require('conform').format { async = true, lsp_format = 'fallback' } -- execute the formatter
-- vim.cmd [[keepjumps keeppatterns %s/\s\+$//e]] -- removes trailing whitespace
end,
mode = 'n',
desc = '[f]ormat buffer',
},
},
---@type conform.setupOpts
opts = {
notify_on_error = true,
formatters_by_ft = {
c = { 'clang-format' },
h = { 'clang-format' },
cpp = { 'clang-format' },
hpp = { 'clang-format' },
glsl = { 'clang-format', lsp_format = "first" },
typescript = { 'clang-format', lsp_format = "first" },
css = { 'clang-format' },
rust = { 'rustfmt' },
sh = { 'shfmt' },
python = { 'isort' },
-- json = { 'jq' },
-- yaml = { 'yq' },
toml = { 'yq' },
xml = { 'yq' },
},
}
} }