Compare commits

...

3 Commits

Author SHA1 Message Date
7b4ca98038 Add autoformat for rust 2026-01-14 23:29:09 +01:00
08193ed385 Nicer status line 2026-01-14 23:19:19 +01:00
c5d19259e2 Autopairs 2026-01-14 23:13:24 +01:00
5 changed files with 60 additions and 0 deletions

View File

@ -4,8 +4,10 @@
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"gruvbox.nvim": { "branch": "main", "commit": "a472496e1a4465a2dd574389dcf6cdb29af9bf1b" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "80c0130c5f16b551865a69e832f1feadeedb5fbe" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
"nvim-cmp": { "branch": "main", "commit": "85bbfad83f804f11688d1ab9486b459e699292d6" },
"nvim-lspconfig": { "branch": "master", "commit": "92ee7d42320edfbb81f3cad851314ab197fa324a" },
"nvim-tree.lua": { "branch": "master", "commit": "ca8d82fff26cb12ced239713e3222f4a9dcd0da0" },

View File

@ -19,6 +19,7 @@ vim.opt.rtp:prepend(lazypath)
-- Initialize lazy.nvim
local plugins = {
require("plugins.colorschemes"), -- theme
require("plugins.editing"), -- editing
require("plugins.lsp"), -- LSP
require("plugins.telescope"), -- fuzzy finder
require("plugins.treesitter"), -- syntax tree

20
lua/plugins/editing.lua Normal file
View File

@ -0,0 +1,20 @@
return {
{
"windwp/nvim-autopairs",
config = function()
local npairs = require("nvim-autopairs")
npairs.setup({
check_ts = true, -- enable Treesitter integration
disable_filetype = { "TelescopePrompt", "vim" },
})
-- If using nvim-cmp for completion, integrate it:
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
local cmp = require("cmp")
cmp.event:on(
"confirm_done",
cmp_autopairs.on_confirm_done()
)
end,
},
}

View File

@ -36,6 +36,14 @@ return {
vim.lsp.config("rust_analyzer", {})
vim.lsp.enable("rust_analyzer")
-- Auto format
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.rs",
callback = function()
vim.lsp.buf.format({ async = false })
end,
})
-- Floating diagnostic on hover
vim.api.nvim_create_autocmd("CursorHold", {
callback = function()

View File

@ -33,4 +33,33 @@ return {
vim.keymap.set("n", "<leader>e", "<cmd>NvimTreeToggle<CR>", { desc = "Toggle file explorer" })
end,
},
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("lualine").setup({
options = {
theme = "auto", -- follow your colorscheme
icons_enabled = true,
component_separators = "|",
section_separators = "",
globalstatus = true, -- single statusline
},
sections = {
lualine_a = { "mode" },
lualine_b = { "branch", "diff" },
lualine_c = {
{ "filename", path = 1 }, -- relative path
},
lualine_x = {
"diagnostics",
"encoding",
"filetype",
},
lualine_y = { "progress" },
lualine_z = { "location" },
},
})
end,
},
}