feat: update config :^)

This commit is contained in:
bieniucieniu 2025-04-17 20:35:14 +02:00
parent b05b97801b
commit 37c86bd3f2
11 changed files with 44 additions and 21 deletions

View File

@ -2,6 +2,9 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' '
vim.g.have_nerd_font = true vim.g.have_nerd_font = true
vim.opt.number = true vim.opt.number = true
vim.g.loaded_netrw = false
-- You can also add relative line numbers, to help with jumping. -- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it! -- Experiment for yourself to see if you like it!
-- vim.opt.relativenumber = true -- vim.opt.relativenumber = true

View File

@ -28,13 +28,23 @@ return { -- Autoformat
} }
end end
end, end,
formatters = {
['zig-fmt'] = {
command = 'zig',
args = { 'fmt', '--stdin' },
stdin = true,
},
},
formatters_by_ft = { formatters_by_ft = {
lua = { 'stylua' }, lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially typescriptreact = { 'biome-check' },
-- python = { "isort", "black" }, javascriptreact = { 'biome-check' },
-- typescript = { 'biome-check' },
-- You can use 'stop_after_first' to run the first available formatter from the list javascript = { 'biome-check' },
-- javascript = { "prettierd", "prettier", stop_after_first = true }, json = { 'biome-check' },
go = { 'gofmt' },
sql = { 'sqlfmt' },
zig = { 'zig-fmt' },
}, },
}, },
} }

View File

@ -4,6 +4,7 @@ return {
-- Enable `lukas-reineke/indent-blankline.nvim` -- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help ibl` -- See `:help ibl`
main = 'ibl', main = 'ibl',
enabled = false,
opts = {}, opts = {},
}, },
} }

View File

@ -1,6 +1,4 @@
return { return {
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
'folke/lazydev.nvim', 'folke/lazydev.nvim',
ft = 'lua', ft = 'lua',
opts = { opts = {

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

@ -0,0 +1,20 @@
return {
'kdheepak/lazygit.nvim',
lazy = true,
cmd = {
'LazyGit',
'LazyGitConfig',
'LazyGitCurrentFile',
'LazyGitFilter',
'LazyGitFilterCurrentFile',
},
-- optional for floating window border decoration
dependencies = {
'nvim-lua/plenary.nvim',
},
-- setting the keybinding for LazyGit with 'keys' is recommended in
-- order to load the plugin when the command is run for the first time
keys = {
{ '<leader>gg', '<cmd>LazyGit<cr>', desc = 'LazyGit' },
},
}

View File

@ -2,6 +2,7 @@ return {
{ -- Linting { -- Linting
'mfussenegger/nvim-lint', 'mfussenegger/nvim-lint',
enabled = false,
event = { 'BufReadPre', 'BufNewFile' }, event = { 'BufReadPre', 'BufNewFile' },
config = function() config = function()
local lint = require 'lint' local lint = require 'lint'

View File

@ -31,6 +31,7 @@ return {
opts = { opts = {
filesystem = { filesystem = {
window = { window = {
-- position = 'float',
mappings = { mappings = {
['l'] = 'open', ['l'] = 'open',
['h'] = 'close_node', ['h'] = 'close_node',

View File

@ -68,14 +68,14 @@ return { -- Fuzzy Finder (files, lsp, etc)
local builtin = require 'telescope.builtin' local builtin = require 'telescope.builtin'
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' }) vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' }) vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' }) vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' }) vim.keymap.set('n', '<leader><leader>', builtin.find_files, { desc = '[S]earch [F]iles' })
vim.keymap.set('n', '<leader>sb', builtin.buffers, { desc = '[ ] Find existing buffers' })
-- Slightly advanced example of overriding default behavior and theme -- Slightly advanced example of overriding default behavior and theme
vim.keymap.set('n', '<leader>/', function() vim.keymap.set('n', '<leader>/', function()

View File

@ -1,6 +0,0 @@
return {
'folke/todo-comments.nvim',
event = 'VimEnter',
dependencies = { 'nvim-lua/plenary.nvim' },
opts = { signs = false },
}

View File

@ -1,3 +0,0 @@
return {
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
}

View File

@ -4,9 +4,7 @@
-- lazy loading plugins that don't need to be loaded immediately at startup. -- lazy loading plugins that don't need to be loaded immediately at startup.
-- --
-- For example, in the following configuration, we use: -- For example, in the following configuration, we use:
-- event = 'VimEnter' -- event = 'VimEnter' which loads which-key before all the UI elements are loaded. Events can be
--
-- which loads which-key before all the UI elements are loaded. Events can be
-- normal autocommands events (`:help autocmd-events`). -- normal autocommands events (`:help autocmd-events`).
-- --
-- Then, because we use the `opts` key (recommended), the configuration runs -- Then, because we use the `opts` key (recommended), the configuration runs