diff --git a/init.lua b/init.lua index 53fb5af0..5e255ade 100644 --- a/init.lua +++ b/init.lua @@ -2,6 +2,9 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' vim.g.have_nerd_font = true vim.opt.number = true + +vim.g.loaded_netrw = false + -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! -- vim.opt.relativenumber = true diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index f7497b17..bc4edfb6 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -28,13 +28,23 @@ return { -- Autoformat } end end, + formatters = { + ['zig-fmt'] = { + command = 'zig', + args = { 'fmt', '--stdin' }, + stdin = true, + }, + }, formatters_by_ft = { lua = { 'stylua' }, - -- Conform can also run multiple formatters sequentially - -- python = { "isort", "black" }, - -- - -- You can use 'stop_after_first' to run the first available formatter from the list - -- javascript = { "prettierd", "prettier", stop_after_first = true }, + typescriptreact = { 'biome-check' }, + javascriptreact = { 'biome-check' }, + typescript = { 'biome-check' }, + javascript = { 'biome-check' }, + json = { 'biome-check' }, + go = { 'gofmt' }, + sql = { 'sqlfmt' }, + zig = { 'zig-fmt' }, }, }, } diff --git a/lua/plugins/indent_line.lua b/lua/plugins/indent_line.lua index ed7f2693..d60dca41 100644 --- a/lua/plugins/indent_line.lua +++ b/lua/plugins/indent_line.lua @@ -4,6 +4,7 @@ return { -- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help ibl` main = 'ibl', + enabled = false, opts = {}, }, } diff --git a/lua/plugins/lazydev.lua b/lua/plugins/lazydev.lua index 447ce668..834bc59f 100644 --- a/lua/plugins/lazydev.lua +++ b/lua/plugins/lazydev.lua @@ -1,6 +1,4 @@ return { - -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins - -- used for completion, annotations and signatures of Neovim apis 'folke/lazydev.nvim', ft = 'lua', opts = { diff --git a/lua/plugins/lazygit.lua b/lua/plugins/lazygit.lua new file mode 100644 index 00000000..dc1a44a2 --- /dev/null +++ b/lua/plugins/lazygit.lua @@ -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 = { + { 'gg', 'LazyGit', desc = 'LazyGit' }, + }, +} diff --git a/lua/plugins/lint.lua b/lua/plugins/lint.lua index 907c6bf3..10e268ec 100644 --- a/lua/plugins/lint.lua +++ b/lua/plugins/lint.lua @@ -2,6 +2,7 @@ return { { -- Linting 'mfussenegger/nvim-lint', + enabled = false, event = { 'BufReadPre', 'BufNewFile' }, config = function() local lint = require 'lint' diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 149671c3..ff8ef244 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -31,6 +31,7 @@ return { opts = { filesystem = { window = { + -- position = 'float', mappings = { ['l'] = 'open', ['h'] = 'close_node', diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 089c4852..522b5558 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -68,14 +68,14 @@ return { -- Fuzzy Finder (files, lsp, etc) local builtin = require 'telescope.builtin' vim.keymap.set('n', 'sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) - vim.keymap.set('n', 'sf', builtin.find_files, { desc = '[S]earch [F]iles' }) vim.keymap.set('n', 'ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' }) vim.keymap.set('n', 'sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', 'sg', builtin.live_grep, { desc = '[S]earch by [G]rep' }) vim.keymap.set('n', 'sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) vim.keymap.set('n', 'sr', builtin.resume, { desc = '[S]earch [R]esume' }) vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) - vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) + vim.keymap.set('n', '', builtin.find_files, { desc = '[S]earch [F]iles' }) + vim.keymap.set('n', 'sb', builtin.buffers, { desc = '[ ] Find existing buffers' }) -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() diff --git a/lua/plugins/todo.lua b/lua/plugins/todo.lua deleted file mode 100644 index 15bc4f1e..00000000 --- a/lua/plugins/todo.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - 'folke/todo-comments.nvim', - event = 'VimEnter', - dependencies = { 'nvim-lua/plenary.nvim' }, - opts = { signs = false }, -} diff --git a/lua/plugins/vim-sleuth.lua b/lua/plugins/vim-sleuth.lua deleted file mode 100644 index 7f814c52..00000000 --- a/lua/plugins/vim-sleuth.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { - 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically -} diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua index 406334d8..12d517ec 100644 --- a/lua/plugins/which-key.lua +++ b/lua/plugins/which-key.lua @@ -4,9 +4,7 @@ -- lazy loading plugins that don't need to be loaded immediately at startup. -- -- For example, in the following configuration, we use: --- event = 'VimEnter' --- --- which loads which-key before all the UI elements are loaded. Events can be +-- event = 'VimEnter' which loads which-key before all the UI elements are loaded. Events can be -- normal autocommands events (`:help autocmd-events`). -- -- Then, because we use the `opts` key (recommended), the configuration runs