diff --git a/doc/kickstart.txt b/doc/kickstart.txt deleted file mode 100644 index cb87ac3f..00000000 --- a/doc/kickstart.txt +++ /dev/null @@ -1,24 +0,0 @@ -================================================================================ -INTRODUCTION *kickstart.nvim* - -Kickstart.nvim is a project to help you get started on your neovim journey. - - *kickstart-is-not* -It is not: -- Complete framework for every plugin under the sun -- Place to add every plugin that could ever be useful - - *kickstart-is* -It is: -- Somewhere that has a good start for the most common "IDE" type features: - - autocompletion - - goto-definition - - find references - - fuzzy finding - - and hinting at what more can be done :) -- A place to _kickstart_ your journey. - - You should fork this project and use/modify it so that it matches your - style and preferences. If you don't want to do that, there are probably - other projects that would fit much better for you (and that's great!)! - - vim:tw=78:ts=8:ft=help:norl: diff --git a/doc/tags b/doc/tags deleted file mode 100644 index 687ae772..00000000 --- a/doc/tags +++ /dev/null @@ -1,3 +0,0 @@ -kickstart-is kickstart.txt /*kickstart-is* -kickstart-is-not kickstart.txt /*kickstart-is-not* -kickstart.nvim kickstart.txt /*kickstart.nvim* diff --git a/init.lua b/init.lua index 4d23f522..ba7e1c98 100644 --- a/init.lua +++ b/init.lua @@ -2,7 +2,6 @@ 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. @@ -49,8 +48,13 @@ vim.opt.splitbelow = true -- Sets how neovim will display certain whitespace characters in the editor. -- See `:help 'list'` -- and `:help 'listchars'` -vim.opt.list = true -vim.opt.listchars = { trail = '·', nbsp = '␣' } +vim.opt.list = false +vim.opt.listchars = { trail = '·', nbsp = '␣', tab = ' ' } + +vim.opt.tabstop = 2 -- Number of spaces that a in the file counts for +vim.opt.shiftwidth = 2 -- Number of spaces to use for each step of (auto)indent +vim.opt.expandtab = true -- Use spaces instead of actual tab characters +vim.opt.softtabstop = 2 -- Number of spaces to insert when pressing Tab -- Preview substitutions live, as you type! vim.opt.inccommand = 'split' diff --git a/lua/config/keymap.lua b/lua/config/keymap.lua index d388ca23..38a22b50 100644 --- a/lua/config/keymap.lua +++ b/lua/config/keymap.lua @@ -12,6 +12,21 @@ end) -- Diagnostic keymaps vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) +vim.keymap.set('n', ']e', function() + vim.diagnostic.jump { forward = true, float = true, count = 1, severity = 'ERROR' } +end, { desc = 'Go to next diagnostic' }) +vim.keymap.set('n', '[e', function() + vim.diagnostic.jump { forward = false, float = true, count = 1, severity = 'ERROR' } +end, { desc = 'Go to previous diagnostic' }) + +vim.keymap.set('n', ']w', function() + vim.diagnostic.jump { forward = true, float = true, count = 1, severity = 'WARN' } +end, { desc = 'Go to next diagnostic' }) +vim.keymap.set('n', '[w', function() + vim.diagnostic.jump { forward = false, float = true, count = 1, severity = 'WARN' } +end, { desc = 'Go to previous diagnostic' }) +vim.keymap.set('n', 'cd', vim.diagnostic.open_float, { desc = 'Line Diagnostics' }) + -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier -- for people to discover. Otherwise, you normally need to press , which -- is not what someone will guess without a bit more experience. diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index bc4edfb6..443914a9 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -4,16 +4,16 @@ return { -- Autoformat cmd = { 'ConformInfo' }, keys = { { - 'f', + 'ff', function() - require('conform').format { async = true, lsp_format = 'fallback' } + require('conform').format { async = true, lsp_format = 'first' } end, - mode = '', + mode = { 'n', 'v' }, desc = '[F]ormat buffer', }, }, opts = { - notify_on_error = false, + notify_on_error = true, format_on_save = function(bufnr) -- Disable "format_on_save lsp_fallback" for languages that don't -- have a well standardized coding style. You can add additional @@ -24,7 +24,7 @@ return { -- Autoformat else return { timeout_ms = 500, - lsp_format = 'fallback', + lsp_format = 'first', } end end, @@ -34,6 +34,9 @@ return { -- Autoformat args = { 'fmt', '--stdin' }, stdin = true, }, + biome = { + --require_cwd = true, + }, }, formatters_by_ft = { lua = { 'stylua' }, diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua deleted file mode 100644 index 501bed0d..00000000 --- a/lua/plugins/gitsigns.lua +++ /dev/null @@ -1,16 +0,0 @@ --- Adds git related signs to the gutter, as well as utilities for managing changes --- NOTE: gitsigns is already included in init.lua but contains only the base --- config. This will add also the recommended keymaps. - -return { -- Adds git related signs to the gutter, as well as utilities for managing changes - 'lewis6991/gitsigns.nvim', - opts = { - signs = { - add = { text = '+' }, - change = { text = '~' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - }, - }, -} diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 184aced0..51cc2e36 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -76,7 +76,7 @@ return { -- Jump to the definition of the word under your cursor. -- This is where a variable was first declared, or where a function is defined, etc. -- To jump back, press . - -- map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') + map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') -- WARN: This is not Goto Definition, this is Goto Declaration.