From 4c5f87426b7c361b9f535ba17b5d882f4bf25e4a Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 27 Sep 2023 11:13:36 +0200 Subject: Added vim-matchup plugin --- config/nvim/lua/plugins.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'config') diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index 03659d7..998de38 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -14,6 +14,13 @@ return require("packer").startup(function() -- end -- } + use { + 'andymass/vim-matchup', + setup = function() + vim.g.matchup_matchparen_offscreen = { method = "popup" } + end + } + -- Put arguments on multiple lines use { "FooSoft/vim-argwrap", @@ -325,6 +332,22 @@ return require("packer").startup(function() -- end -- } + -- tokyonight color scheme + -- use { + -- "folke/tokyonight.nvim", + -- config = function() + -- vim.opt.termguicolors = true + -- vim.opt.background = "dark" + -- vim.cmd [[ colorscheme tokyonight-moon ]] + -- require("tokyonight").setup({ + -- styles = { + -- comments = { italic = true }, + -- keywords = { italic = true }, + -- }, + -- }) + -- end + -- } + -- status line use { "nvim-lualine/lualine.nvim", @@ -332,6 +355,7 @@ return require("packer").startup(function() config = function() require("lualine").setup { options = { + -- theme = "tokyonight", theme = "gruvbox", -- theme = "nord", icons_enabled = true, @@ -371,6 +395,11 @@ return require("packer").startup(function() highlight = { enable = true }, + matchup = { + enable = true, -- mandatory, false will disable the whole extension + -- disable = { "c", "ruby" }, -- optional, list of language that will be disabled + -- [options] + }, -- indent = { enable = true }, -- TODO: could be neat -- incremental_selection = { @@ -393,6 +422,7 @@ return require("packer").startup(function() requires = { {"nvim-lua/plenary.nvim"}, {"kyazdani42/nvim-web-devicons"}, + {"nvim-telescope/telescope-symbols.nvim"}, { "nvim-telescope/telescope-fzf-native.nvim", run = "make", -- cgit From 2c7be2b3f5b68ecb6d55097e97dccbeb58d12246 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 27 Sep 2023 13:18:44 +0200 Subject: Change fish alias for ls=eza and cat=bat if those program are installed --- config/fish/config.fish | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'config') diff --git a/config/fish/config.fish b/config/fish/config.fish index fa2f40f..dfefe8e 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -115,10 +115,14 @@ if status is-interactive alias arduino-cli='arduino-cli --config-file $XDG_CONFIG_HOME/arduino15/arduino-cli.yaml' # alias nvidia-settings --config="$XDG_CONFIG_HOME"/nvidia/settings - if [ "$(uname)" = 'Linux' ] - alias ls='ls --color=auto -Fh' + if command -qv eza + alias ls='eza --git --git-repos --mounts --classify --icons' else - alias ls='ls -G -Fh' + if [ "$(uname)" = 'Linux' ] + alias ls='ls --color=auto -Fh' + else + alias ls='ls -G -Fh' + end end abbr ll 'ls -l' abbr la 'ls -A' @@ -126,13 +130,20 @@ if status is-interactive abbr lss 'ls -Ssh' # tree - alias tree 'tree -FC' + if command -qv eza + alias tree='ls -T' + alias ti="ls -T --git-ignore" + else + alias tree 'tree -FC' + alias ti="tree --matchdirs -I __pycache__ -I node_modules -I '*.o' -I build" + end abbr t 'tree' abbr ta 'tree -a' abbr t1 'tree -L 1' abbr t2 'tree -L 2' abbr t3 'tree -L 3' - alias ti="tree --matchdirs -I __pycache__ -I node_modules -I '*.o' -I build" + + command -qv bat && alias cat='bat' # git abbr ga 'git add' -- cgit From 586b14a58945798f2ca1c38c6f3660b9384d36b5 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 27 Sep 2023 13:59:32 +0200 Subject: Add delta git config and bat as a man pager --- config/fish/config.fish | 5 ++++- config/git/config.darwin | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/fish/config.fish b/config/fish/config.fish index dfefe8e..ac14b33 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -143,7 +143,10 @@ if status is-interactive abbr t2 'tree -L 2' abbr t3 'tree -L 3' - command -qv bat && alias cat='bat' + if command -qv bat + alias cat='bat --theme gruvbox-dark' + set -gx MANPAGER "sh -c 'col -bx | bat --theme gruvbox-dark -l man -p'" + end # git abbr ga 'git add' diff --git a/config/git/config.darwin b/config/git/config.darwin index 7d27b5b..dd3f5b0 100644 --- a/config/git/config.darwin +++ b/config/git/config.darwin @@ -7,11 +7,37 @@ rebase = false [merge] tool = vimdiff + conflictstyle = diff3 [commit] gpgsign = false [init] defaultBranch = master [core] editor = "VIMINIT='' nvim" + pager = delta +[interactive] + diffFilter = delta --color-only --syntax-theme gruvbox-dark +[diff] + colorMoved = default +[delta] + syntax-theme = gruvbox-dark + # side-by-side = true + navigate = true # use n and N to move between diff sections + line-numbers = true + + +# [http] +# sslVerify = false +[credential] + helper = store +[filter "lfs"] + required = true + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process +[gpg] + format = ssh +[gpg "ssh"] + allowedSignersFile = # vim:ft=gitconfig -- cgit From 1d2e251d313a759246b95e6c4192e1e2c2f85bf4 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Fri, 6 Oct 2023 10:37:29 +0200 Subject: Added git push.autoSetupRemove and tag.sort setting --- config/git/config.darwin | 7 ++++++- config/git/config.linux | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/git/config.darwin b/config/git/config.darwin index dd3f5b0..ac89ec5 100644 --- a/config/git/config.darwin +++ b/config/git/config.darwin @@ -1,3 +1,5 @@ +# vim:ft=gitconfig + [user] name = Charles Cabergs email = charles.cabergs@colruytgroup.com @@ -40,4 +42,7 @@ [gpg "ssh"] allowedSignersFile = -# vim:ft=gitconfig +[push] + autoSetupRemote = true +[tag] + sort = v:refname diff --git a/config/git/config.linux b/config/git/config.linux index aea7fb1..a7b8baa 100644 --- a/config/git/config.linux +++ b/config/git/config.linux @@ -1,3 +1,5 @@ +# vim:ft=gitconfig + [user] name = Charles Cabergs email = me@cacharle.xyz @@ -29,8 +31,11 @@ editor = "VIMINIT='' nvim" [safe] directory = * +[push] + autoSetupRemote = true # git push without remote and branch specified +[tag] + sort = v:refname # Sort tag by version instead of ascii sort -# vim:ft=gitconfig [filter "lfs"] required = true clean = git-lfs clean -- %f -- cgit