projet c
This commit is contained in:
2
init.lua
2
init.lua
@ -1,5 +1,5 @@
|
||||
require("config")
|
||||
require("plugins")
|
||||
|
||||
require('vim._core.ui2').enable()
|
||||
require("vim._core.ui2").enable()
|
||||
|
||||
|
||||
@ -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",
|
||||
},
|
||||
})
|
||||
|
||||
@ -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
18
lua/plugins/conform.lua
Normal 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" },
|
||||
-- }
|
||||
@ -9,3 +9,5 @@ require("plugins.lsplines")
|
||||
require("plugins.mini")
|
||||
require("plugins.flash")
|
||||
require("plugins.git")
|
||||
require("plugins.conform")
|
||||
require("plugins.neogen")
|
||||
|
||||
@ -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
3
lua/plugins/neogen.lua
Normal file
@ -0,0 +1,3 @@
|
||||
vim.pack.add({ "https://github.com/danymat/neogen" })
|
||||
|
||||
require("neogen").setup({})
|
||||
@ -12,6 +12,10 @@
|
||||
"rev": "b51a659459df8d078201aefc995db8175ed55e84",
|
||||
"src": "https://github.com/xzbdmw/colorful-menu.nvim"
|
||||
},
|
||||
"conform.nvim": {
|
||||
"rev": "dca1a190aa85f9065979ef35802fb77131911106",
|
||||
"src": "https://github.com/stevearc/conform.nvim"
|
||||
},
|
||||
"flash.nvim": {
|
||||
"rev": "fcea7ff883235d9024dc41e638f164a450c14ca2",
|
||||
"src": "https://github.com/folke/flash.nvim"
|
||||
@ -48,6 +52,10 @@
|
||||
"rev": "704b99f10a72cc05d370cfeb294ff83412a8ab55",
|
||||
"src": "https://github.com/jake-stewart/multicursor.nvim"
|
||||
},
|
||||
"neogen": {
|
||||
"rev": "23e7e9f883d01289ebd90e98025acc860ea26366",
|
||||
"src": "https://github.com/danymat/neogen"
|
||||
},
|
||||
"nvim-lspconfig": {
|
||||
"rev": "bedca8b426b2fee0ccac596d167d71bbe971253f",
|
||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||
|
||||
Reference in New Issue
Block a user