From b8406735bab64b14ab7f9a25b20cccb272d4d64e Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 11 Mar 2022 14:02:01 +0100 Subject: [PATCH 1/6] home: vim: set 'termguicolors' For once, I like the look *with* 24-bit colors better on this current color-scheme. --- home/vim/init.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/home/vim/init.vim b/home/vim/init.vim index ab5f648..e5e863c 100644 --- a/home/vim/init.vim +++ b/home/vim/init.vim @@ -82,6 +82,8 @@ set background=dark let g:gruvbox_plugin_hi_groups=1 " Include filetype integration let g:gruvbox_filetype_hi_groups=1 +" 24 bit colors +set termguicolors " Use my preferred colorscheme colorscheme gruvbox8 " }}} From 0fd5fb86b197722fb0b3e815bda1713d0fd30839 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 11 Mar 2022 14:03:18 +0100 Subject: [PATCH 2/6] home: vim: telescope: disable scrolling up --- home/vim/plugin/settings/telescope.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/home/vim/plugin/settings/telescope.vim b/home/vim/plugin/settings/telescope.vim index 4731b39..66c0732 100644 --- a/home/vim/plugin/settings/telescope.vim +++ b/home/vim/plugin/settings/telescope.vim @@ -2,6 +2,14 @@ lua << EOF local telescope = require("telescope") telescope.setup({ + defaults = { + mappings = { + i = { + -- I want the normal readline mappings rather than scrolling + [""] = false, + } + } + }, extensions = { fzf = { fuzzy = true, From 0af000e52e98e6c87bda60839bcc08bd14211d88 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 11 Mar 2022 14:04:37 +0100 Subject: [PATCH 3/6] home: vim: telescope: add 'which-key' mapping This opens a little preview window with different mappings for telescope. --- home/vim/plugin/settings/telescope.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/home/vim/plugin/settings/telescope.vim b/home/vim/plugin/settings/telescope.vim index 66c0732..fc2c5fb 100644 --- a/home/vim/plugin/settings/telescope.vim +++ b/home/vim/plugin/settings/telescope.vim @@ -5,6 +5,7 @@ telescope.setup({ defaults = { mappings = { i = { + [""] = "which_key", -- I want the normal readline mappings rather than scrolling [""] = false, } From e32ce32860f5239e95f981e3e8f814bbb73b64ca Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 11 Mar 2022 14:10:04 +0100 Subject: [PATCH 4/6] home: git: use 'zdiff3' merge conflict markers See GitHub's presentation about this feature [1]. [1]: https://github.blog/2022-01-24-highlights-from-git-2-35/ --- home/git/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/home/git/default.nix b/home/git/default.nix index 6f4434b..9f59d52 100644 --- a/home/git/default.nix +++ b/home/git/default.nix @@ -120,6 +120,10 @@ in defaultBranch = "main"; }; + merge = { + conflictStyle = "zdiff3"; + }; + pull = { # Avoid useless merge commits rebase = true; From 2690dbf35223d0fb78cd6d5e3c2ac354de2c9dbc Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 11 Mar 2022 14:28:09 +0100 Subject: [PATCH 5/6] overlays: add vim-plugins-overrides --- overlays/default.nix | 2 ++ overlays/vim-plugins-overrides/default.nix | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 overlays/vim-plugins-overrides/default.nix diff --git a/overlays/default.nix b/overlays/default.nix index 3f5a246..81692be 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,4 +1,6 @@ { + null-ls-update = import ./vim-plugins-overrides; + sabnzbd-fix-missing-packages = import ./sabnzbd-fix-missing-dependencies; transgui-fix-duplicate-status = import ./transgui-fix-duplicate-status; diff --git a/overlays/vim-plugins-overrides/default.nix b/overlays/vim-plugins-overrides/default.nix new file mode 100644 index 0000000..36c622b --- /dev/null +++ b/overlays/vim-plugins-overrides/default.nix @@ -0,0 +1,17 @@ +final: prev: +let +in +{ + # FIXME: update null-ls + vimPlugins = prev.vimPlugins.extend (self: super: { + null-ls-nvim = super.null-ls-nvim.overrideAttrs (old: { + version = "2022-03-11"; + src = final.fetchFromGitHub { + owner = "jose-elias-alvarez"; + repo = "null-ls.nvim"; + rev = "1ee1da4970b3c94bed0d0250a353bff633901cd1"; + sha256 = "sha256-db9d2djNUCZzxIkycUn8Kcu4TS33w55eWxUn2OzcLas="; + }; + }); + }); +} From 77e53c16439d3bd4a69aaa13399a0eeb9d78ccda Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 11 Mar 2022 14:30:24 +0100 Subject: [PATCH 6/6] home: vim: null-ls: prefer 'pflake8' if available --- home/vim/plugin/settings/null-ls.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/home/vim/plugin/settings/null-ls.vim b/home/vim/plugin/settings/null-ls.vim index bec8124..b2102bd 100644 --- a/home/vim/plugin/settings/null-ls.vim +++ b/home/vim/plugin/settings/null-ls.vim @@ -38,8 +38,14 @@ null_ls.register({ -- Python null_ls.register({ null_ls.builtins.diagnostics.flake8.with({ + -- Only used if available, but prefer pflake8 if available + condition = function() + return utils.is_executable("flake8") and not utils.is_executable("pflake8") + end, + }), + null_ls.builtins.diagnostics.pyproject_flake8.with({ -- Only used if available - condition = utils.is_executable_condition("flake8"), + condition = utils.is_executable_condition("pflake8"), }), null_ls.builtins.diagnostics.mypy.with({ -- Only used if available