From 07d873e15f471c2c15d5267596d5bfff4712177e Mon Sep 17 00:00:00 2001 From: Jonas Hagberg Date: Fri, 29 Mar 2024 14:29:23 +0100 Subject: [PATCH 01/12] Change colorscheme to Kanagawa --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index db55a9e8fd6..7a5abb133cf 100644 --- a/init.lua +++ b/init.lua @@ -734,13 +734,13 @@ require('lazy').setup({ -- change the command in the config to whatever the name of that colorscheme is. -- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. - 'folke/tokyonight.nvim', + 'rebelot/kanagawa.nvim', priority = 1000, -- Make sure to load this before all the other start plugins. init = function() -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'kanagawa' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' From 53dbdf9dc0d085baeeab69c49d9ca2ebf2dd0512 Mon Sep 17 00:00:00 2001 From: Jonas Hagberg Date: Fri, 29 Mar 2024 14:51:08 +0100 Subject: [PATCH 02/12] Add vim-delve plugin --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index 7a5abb133cf..011342af26f 100644 --- a/init.lua +++ b/init.lua @@ -817,6 +817,9 @@ require('lazy').setup({ -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects end, }, + { + 'sebdah/vim-delve', + }, -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and From d06d23eee2e2d92b3ef94db0d326ca163da56871 Mon Sep 17 00:00:00 2001 From: Jonas Hagberg Date: Tue, 2 Apr 2024 16:09:03 +0200 Subject: [PATCH 03/12] Add copilot --- init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 011342af26f..5ffaf4a6a4a 100644 --- a/init.lua +++ b/init.lua @@ -818,7 +818,10 @@ require('lazy').setup({ end, }, { - 'sebdah/vim-delve', + 'sebdah/vim-delve', + }, + { + 'github/copilot.vim', }, -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the From 2f8c4fd847dddc7ab1ed5f4f5875686626c88c1a Mon Sep 17 00:00:00 2001 From: Jonas Hagberg Date: Tue, 2 Apr 2024 16:48:48 +0200 Subject: [PATCH 04/12] Auto-format go code with golines --- init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.lua b/init.lua index 5ffaf4a6a4a..62774c6d176 100644 --- a/init.lua +++ b/init.lua @@ -614,6 +614,7 @@ require('lazy').setup({ end, formatters_by_ft = { lua = { 'stylua' }, + go = { 'golines' }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, -- @@ -865,5 +866,8 @@ require('lazy').setup({ }, }) +require('conform').formatters.golines = { + prepend_args = { '-w -m 128 --no-reformat-tags' }, +} -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et From 4e5ed5d043a081a9c3a182cc895cb0f3d53d26da Mon Sep 17 00:00:00 2001 From: Jonas Hagberg Date: Wed, 3 Apr 2024 10:18:46 +0200 Subject: [PATCH 05/12] Fix autoformat --- init.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index 87f6931c5b3..ab15aca9f78 100644 --- a/init.lua +++ b/init.lua @@ -600,17 +600,17 @@ require('lazy').setup({ { -- Autoformat 'stevearc/conform.nvim', - lazy = false, - keys = { - { - 'f', - function() - require('conform').format { async = true, lsp_fallback = true } - end, - mode = '', - desc = '[F]ormat buffer', - }, - }, + lazy = true, + -- keys = { + -- { + -- 'f', + -- function() + -- require('conform').format { async = true, lsp_fallback = true } + -- end, + -- mode = '', + -- desc = '[F]ormat buffer', + -- }, + -- }, opts = { notify_on_error = false, format_on_save = function(bufnr) @@ -878,7 +878,7 @@ require('lazy').setup({ }) require('conform').formatters.golines = { - prepend_args = { '-w -m 128 --no-reformat-tags' }, + prepend_args = { '--max-len=128' }, } -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et From 769e3c83849b1a23dea00dccfc017123f23e6a10 Mon Sep 17 00:00:00 2001 From: Jonas Hagberg Date: Tue, 16 Apr 2024 13:48:32 +0200 Subject: [PATCH 06/12] Enable relative line numbers --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index ab15aca9f78..292cf76b995 100644 --- a/init.lua +++ b/init.lua @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true +vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' From c1383b1fe60aa8e45920f5c197e01a01c72efc8d Mon Sep 17 00:00:00 2001 From: Jonas Hagberg Date: Tue, 16 Apr 2024 13:49:00 +0200 Subject: [PATCH 07/12] Disable displaying whitespace --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 292cf76b995..cab8055fd46 100644 --- a/init.lua +++ b/init.lua @@ -142,8 +142,8 @@ 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 = { tab = '» ', trail = '·', nbsp = '␣' } +-- vim.opt.list = true +-- vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } -- Preview substitutions live, as you type! vim.opt.inccommand = 'split' From 74c9eb54d6adb90aa266c73d8f016a44c070cfd1 Mon Sep 17 00:00:00 2001 From: Jonas Hagberg Date: Tue, 16 Apr 2024 13:49:30 +0200 Subject: [PATCH 08/12] Set tabstop --- init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.lua b/init.lua index cab8055fd46..0683ded1923 100644 --- a/init.lua +++ b/init.lua @@ -154,6 +154,10 @@ vim.opt.cursorline = true -- Minimal number of screen lines to keep above and below the cursor. vim.opt.scrolloff = 10 +-- Tabstop and shiftwidth settings +vim.opt.tabstop = 4 +vim.opt.shiftwidth = 4 + -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` From 032f22c8f7a2395100d928477454de08caa97521 Mon Sep 17 00:00:00 2001 From: Jonas Hagberg Date: Tue, 16 Apr 2024 13:49:57 +0200 Subject: [PATCH 09/12] Change keymaps for diagnostic next/prev --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 0683ded1923..1ec4d2e836e 100644 --- a/init.lua +++ b/init.lua @@ -166,8 +166,8 @@ vim.opt.hlsearch = true vim.keymap.set('n', '', 'nohlsearch') -- Diagnostic keymaps -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' }) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' }) +vim.keymap.set('n', 'dp', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' }) +vim.keymap.set('n', 'dn', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' }) vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' }) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) From 70e24df473d9aaed30564db3205f7c396848e4c8 Mon Sep 17 00:00:00 2001 From: Jonas Hagberg Date: Wed, 17 Apr 2024 11:43:16 +0200 Subject: [PATCH 10/12] Add tpope/vim-fugitive --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index 1ec4d2e836e..42b3380ae79 100644 --- a/init.lua +++ b/init.lua @@ -839,6 +839,9 @@ require('lazy').setup({ { 'github/copilot.vim', }, + { + 'tpope/vim-fugitive', + }, -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and From f5c963316d26212f6d728a760b6670f606241b27 Mon Sep 17 00:00:00 2001 From: Jonas Hagberg Date: Thu, 18 Apr 2024 14:58:55 +0200 Subject: [PATCH 11/12] =?UTF-8?q?Bind=20=C2=A7=20to=20=20in=20insert?= =?UTF-8?q?=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index 42b3380ae79..2339e41532e 100644 --- a/init.lua +++ b/init.lua @@ -194,6 +194,9 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +-- Bind § to in insert mode +vim.keymap.set('i', '§', '') + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` From d48435309ac5b06f4f7e158641d796c7126ecc2c Mon Sep 17 00:00:00 2001 From: Jonas Hagberg Date: Mon, 15 Jul 2024 07:39:35 +0200 Subject: [PATCH 12/12] Don't reformat golang tags, set flake8 max line length --- init.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 2339e41532e..91a065f3a33 100644 --- a/init.lua +++ b/init.lua @@ -888,7 +888,20 @@ require('lazy').setup({ }) require('conform').formatters.golines = { - prepend_args = { '--max-len=128' }, + prepend_args = { '--max-len=128 --no-reformat-tags' }, } + +require('lspconfig').pylsp.setup { + settings = { + pylsp = { + plugins = { + pycodestyle = { + maxLineLength = 100, + }, + }, + }, + }, +} + -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et