This commit is contained in:
2026-05-02 20:51:17 +02:00
parent 4488f8549a
commit 7590b3cbc1
8 changed files with 40 additions and 7 deletions

View File

@ -79,4 +79,8 @@ vim.keymap.set("n", "<C-u>", "<C-u>zz")
vim.keymap.set("n", "n", "nzzzv")
vim.keymap.set("n", "N", "Nzzzv")
vim.filetype.add({
extension = {
h = "c",
},
})

View File

@ -1,5 +1,5 @@
vim.pack.add({"https://github.com/rktjmp/lush.nvim"})
vim.pack.add({"https://github.com/savq/melange-nvim" })
vim.pack.add({ "https://github.com/rktjmp/lush.nvim" })
vim.pack.add({ "https://github.com/savq/melange-nvim" })
-- vim.g.melange_enable_font_variants = 0 -- disable font variants
-- require("lush") -- make sure Lush is installed

18
lua/plugins/conform.lua Normal file
View File

@ -0,0 +1,18 @@
vim.pack.add({ "https://github.com/stevearc/conform.nvim" })
local conform = require("conform")
conform.setup({
formatters_by_ft = {
c = { "uncrustify" },
},
format_on_save = {
-- These options will be passed to conform.format()
timeout_ms = 500,
lsp_format = "fallback",
}
})
-- conform.formatters.uncrustify = {
-- prepend_args = { "-l", "c", "-c", "/home/albin/coding-projects/uncrustify.cfg" },
-- }

View File

@ -9,3 +9,5 @@ require("plugins.lsplines")
require("plugins.mini")
require("plugins.flash")
require("plugins.git")
require("plugins.conform")
require("plugins.neogen")

View File

@ -1,5 +1,4 @@
vim.pack.add({ 'https://github.com/neovim/nvim-lspconfig' })
vim.lsp.enable({ 'lua_ls' })
vim.lsp.enable({ 'clangd' })
@ -10,14 +9,13 @@ vim.lsp.config("rust_analyzer", {
{
postfix = { enable = true, },
},
['rust-analyzer'] = {
check = {
command = "clippy",
},
}
},
}
})
)
vim.lsp.enable('rust_analyzer')
vim.keymap.set("n", "<leader>t", vim.diagnostic.open_float)

3
lua/plugins/neogen.lua Normal file
View File

@ -0,0 +1,3 @@
vim.pack.add({ "https://github.com/danymat/neogen" })
require("neogen").setup({})