From 627ee628dbf761570eff0441a4f30bb757578063 Mon Sep 17 00:00:00 2001 From: Tiago Garcia Date: Wed, 10 Jul 2024 12:01:01 +0100 Subject: [PATCH] Some changes ig --- .../nvim/after/plugin/rainbow-delimiters.lua | 26 +++++++++++++++++++ .config/nvim/after/plugin/treesitter.lua | 22 +++++----------- .config/nvim/lua/tiagorg/colors.lua | 4 +-- .config/nvim/lua/tiagorg/packer.lua | 3 ++- .gitconfig | 6 ++--- .gitignore | 1 + .zsh/.zshrc | 3 --- 7 files changed, 40 insertions(+), 25 deletions(-) create mode 100644 .config/nvim/after/plugin/rainbow-delimiters.lua diff --git a/.config/nvim/after/plugin/rainbow-delimiters.lua b/.config/nvim/after/plugin/rainbow-delimiters.lua new file mode 100644 index 0000000..81bc365 --- /dev/null +++ b/.config/nvim/after/plugin/rainbow-delimiters.lua @@ -0,0 +1,26 @@ +local rainbow_delimiters = require 'rainbow-delimiters' + +require('rainbow-delimiters.setup').setup { + strategy = { + [''] = rainbow_delimiters.strategy['global'], + vim = rainbow_delimiters.strategy['local'], + }, + query = { + [''] = 'rainbow-delimiters', + lua = 'rainbow-blocks', + }, + priority = { + [''] = 110, + lua = 210, + }, + highlight = { + 'RainbowDelimiterRed', + 'RainbowDelimiterYellow', + 'RainbowDelimiterBlue', + 'RainbowDelimiterOrange', + 'RainbowDelimiterGreen', + 'RainbowDelimiterViolet', + 'RainbowDelimiterCyan', + }, +} + diff --git a/.config/nvim/after/plugin/treesitter.lua b/.config/nvim/after/plugin/treesitter.lua index 5187a68..e734201 100644 --- a/.config/nvim/after/plugin/treesitter.lua +++ b/.config/nvim/after/plugin/treesitter.lua @@ -1,12 +1,12 @@ require 'nvim-treesitter.configs'.setup { -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "bash", "lua", "vim", "vimdoc", "query", "regex", - "c", "cpp", "c_sharp", "rust", "python", - "html", "css", "php", "javascript", "typescript", "sql" - }, + ensure_installed = { "bash", "lua", "vim", "regex", "c", "c_sharp", + "python", "html", "css", "php", "javascript", "typescript", "sql" + }, + -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, + sync_install = true, -- Automatically install missing parsers when entering buffer -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally @@ -19,16 +19,6 @@ require 'nvim-treesitter.configs'.setup { -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). -- Using this option may slow down your editor, and you may see some duplicate highlights. -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = true, + additional_vim_regex_highlighting = false, }, - - rainbow = { - enable = true, - -- list of languages you want to disable the plugin for - disable = { 'jsx', 'cpp' }, - -- Which query to use for finding delimiters - query = 'rainbow-parens', - -- Highlight the entire buffer all at once - strategy = require('ts-rainbow').strategy.global, - } } diff --git a/.config/nvim/lua/tiagorg/colors.lua b/.config/nvim/lua/tiagorg/colors.lua index b9398b2..16beba2 100644 --- a/.config/nvim/lua/tiagorg/colors.lua +++ b/.config/nvim/lua/tiagorg/colors.lua @@ -4,7 +4,7 @@ end function LoadColors() local color = nil - local file = io.open("/home/tiagorg/.config/nvim/data/colorscheme.txt", "r") + local file = io.open("/home/tiagorg/.dotfiles/.config/nvim/data/colorscheme.txt", "r") -- check if file exists if file == nil then @@ -30,7 +30,7 @@ end function OnColorschemeChanged() local newColorscheme = vim.g.colors_name - local file = io.open("/home/tiagorg/.config/nvim/data/colorscheme.txt", "w") + local file = io.open("/home/tiagorg/.dotfiles/.config/nvim/data/colorscheme.txt", "w") if file == nil then return end diff --git a/.config/nvim/lua/tiagorg/packer.lua b/.config/nvim/lua/tiagorg/packer.lua index d17eccf..d64af18 100644 --- a/.config/nvim/lua/tiagorg/packer.lua +++ b/.config/nvim/lua/tiagorg/packer.lua @@ -56,7 +56,8 @@ return require('packer').startup(function(use) use 'mbbill/undotree' use "andrewferrier/wrapping.nvim" use "lukas-reineke/indent-blankline.nvim" - use "HiPhish/nvim-ts-rainbow2" + -- use "HiPhish/nvim-ts-rainbow2" + use "HiPhish/rainbow-delimiters.nvim" use "FotiadisM/tabset.nvim" use 'nvim-tree/nvim-web-devicons' use 'nvim-tree/nvim-tree.lua' diff --git a/.gitconfig b/.gitconfig index 392b690..6fac287 100644 --- a/.gitconfig +++ b/.gitconfig @@ -6,10 +6,10 @@ helper = !/usr/bin/gh auth git-credential [user] email = tiago.rgarcia@ua.pt - name = TiagoRG - signingkey = DFCD48E3F420DB42! + name = Tiago Garcia + signingkey = 545513959AF6B11BBAD0EF3FFF0A53A30B1ADF82 [core] - editor = nvim + editor = nvim excludesfile = /home/tiagorg/.gitignore [alias] commit = commit -S diff --git a/.gitignore b/.gitignore index ac97a5b..33b353f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ .zsh/zsh-autosuggestions .zsh/zsh-syntax-highlighting .zsh/.zcompcache +.zsh/.zsh_history diff --git a/.zsh/.zshrc b/.zsh/.zshrc index 3b6a0aa..742f3ed 100644 --- a/.zsh/.zshrc +++ b/.zsh/.zshrc @@ -307,7 +307,4 @@ export LD_LIBRARY_PATH=/home/tiagorg/.dotfiles/.local/lib:$LD_LIBRARY_PATH export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gcr/ssh -export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm - eval "$(fzf --zsh)"