Compare commits

..

No commits in common. "32902e23dfcfbac6b96375b773e53dc131e00625" and "3b03fb6cd2a30669422b4ad0b852a1090489fd25" have entirely different histories.

12 changed files with 77 additions and 41 deletions

View File

@ -9,9 +9,9 @@ require("autoclose").setup({
["]"] = { escape = true, close = false, pair = "[]", disabled_filetypes = {} }, ["]"] = { escape = true, close = false, pair = "[]", disabled_filetypes = {} },
["}"] = { escape = true, close = false, pair = "{}", disabled_filetypes = {} }, ["}"] = { escape = true, close = false, pair = "{}", disabled_filetypes = {} },
['"'] = { escape = true, close = true, pair = '""', disabled_filetypes = {"gitcommit", "tex", "asciidoc"} }, ['"'] = { escape = true, close = true, pair = '""', disabled_filetypes = {"gitcommit", "tex"} },
["'"] = { escape = true, close = true, pair = "''", disabled_filetypes = {"gitcommit", "tex", "asciidoc"} }, ["'"] = { escape = true, close = true, pair = "''", disabled_filetypes = {"gitcommit", "tex"} },
["`"] = { escape = true, close = true, pair = "``", disabled_filetypes = {"gitcommit", "tex", "asciidoc"} }, ["`"] = { escape = true, close = true, pair = "``", disabled_filetypes = {"gitcommit", "tex"} },
["$"] = { escape = true, close = true, pair = "$$", enabled_filetypes = {"tex"} }, ["$"] = { escape = true, close = true, pair = "$$", enabled_filetypes = {"tex"} },
}, },

View File

@ -38,9 +38,9 @@ require('gitsigns').setup {
row = 0, row = 0,
col = 1 col = 1
}, },
--yadm = { yadm = {
-- enable = false enable = false
--}, },
-- keymaping -- keymaping
on_attach = function(bufnr) on_attach = function(bufnr)

View File

@ -10,7 +10,7 @@ require('lualine').setup {
}, },
ignore_focus = {}, ignore_focus = {},
always_divide_middle = true, always_divide_middle = true,
globalstatus = true, globalstatus = false,
refresh = { refresh = {
statusline = 10, statusline = 10,
tabline = 1000, tabline = 1000,

View File

@ -1,5 +1,5 @@
local builtin = require('telescope.builtin') local builtin = require('telescope.builtin')
local trouble = require("trouble.sources.telescope") local trouble = require('trouble.providers.telescope')
-- File pickers -- File pickers
vim.keymap.set('n', '<leader>pf', "<cmd>Telescope find_files hidden=true<CR>", {}) vim.keymap.set('n', '<leader>pf', "<cmd>Telescope find_files hidden=true<CR>", {})
@ -13,7 +13,7 @@ vim.keymap.set('n', '<leader>gc', builtin.git_commits, {})
vim.keymap.set('n', '<leader>gs', builtin.git_stash, {}) vim.keymap.set('n', '<leader>gs', builtin.git_stash, {})
-- LSP pickers -- LSP pickers
vim.keymap.set('n', '<leader>pe', trouble.open, {}) vim.keymap.set('n', '<leader>pe', trouble.open_with_trouble, {})
-- Help pickers -- Help pickers
vim.keymap.set('n', '<leader>sh', builtin.help_tags, {}) vim.keymap.set('n', '<leader>sh', builtin.help_tags, {})

View File

@ -1,19 +1,16 @@
require("trouble").setup { require("trouble").setup {
position = "bottom", position = "bottom",
modes = { auto_open = true,
diagnostics = { auto_close = true,
auto_open = true, auto_preview = false,
auto_close = false, icons = true,
auto_preview = false
},
},
} }
-- Keybindings -- Keybindings
vim.keymap.set("n", "<leader>x", "<cmd>Trouble diagnostics<cr>", { noremap = true, silent = true }) vim.keymap.set("n", "<leader>x", "<cmd>TroubleToggle workspace_diagnostics<cr>", { noremap = true, silent = true })
vim.keymap.set("n", ")", function() vim.keymap.set("n", ")", function ()
require("trouble").next({ skip_groups = true, jump = true }) require("trouble").next({ skip_groups = true, jump = true })
end, { noremap = true, silent = true }) end, { noremap = true, silent = true })
vim.keymap.set("n", "(", function() vim.keymap.set("n", "(", function ()
require("trouble").previous({ skip_groups = true, jump = true }) require("trouble").previous({ skip_groups = true, jump = true })
end, { noremap = true, silent = true }) end, { noremap = true, silent = true })

View File

@ -1,4 +1,6 @@
local opts = { require("wrapping").setup()
opts = {
auto_set_mode_filetype_allowlist = { auto_set_mode_filetype_allowlist = {
"asciidoc", "asciidoc",
"gitcommit", "gitcommit",
@ -12,5 +14,3 @@ local opts = {
}, },
soft_wrap = true, soft_wrap = true,
} }
require("wrapping").setup(opts)

View File

@ -7,13 +7,13 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, {
end, end,
}) })
vim.api.nvim_create_autocmd({"CmdlineLeave", "CmdlineChanged"}, { vim.api.nvim_exec([[
group = vim.api.nvim_create_augroup("SearchHighlight", { clear = true }), augroup SearchHighlight
pattern = { "/", "\\?" }, autocmd!
callback = function() autocmd CmdlineLeave /,\? :nnoremap <buffer> <Esc> :noh<CR>
vim.cmd([[nnoremap <buffer> <Esc> :noh<CR>]]) autocmd CmdlineChanged /,\? :nnoremap <buffer> <Esc> :noh<CR>
end augroup END
}) ]], false)
vim.api.nvim_create_autocmd("TextYankPost", { vim.api.nvim_create_autocmd("TextYankPost", {
desc = "Highlight yanked text", desc = "Highlight yanked text",

View File

@ -9,10 +9,6 @@ return require('packer').startup(function(use)
use "loctvl842/monokai-pro.nvim" use "loctvl842/monokai-pro.nvim"
use "TiagoRG/onedarkpro.nvim" use "TiagoRG/onedarkpro.nvim"
use 'Mofiqul/vscode.nvim' use 'Mofiqul/vscode.nvim'
use {
'rose-pine/neovim',
as = 'rose-pine'
}
-- Essentials -- Essentials
use { use {
@ -73,4 +69,22 @@ return require('packer').startup(function(use)
-- Little friend -- Little friend
use("github/copilot.vim") use("github/copilot.vim")
-- trying out
use {
'windwp/nvim-ts-autotag',
config = function()
require('nvim-ts-autotag').setup()
-- require 'nvim-treesitter.configs'.setup {
-- autotag = {
-- enable = true,
-- enable_rename = true,
-- enable_close = true,
-- enable_close_on_slash = true,
-- filetypes = { "html", "xml", "javascript", "typescript", "svelte", "vue", "javascriptreact", "typescriptreact"},
-- }
-- }
end
}
use 'mg979/vim-visual-multi'
end) end)

View File

@ -30,6 +30,7 @@ vim.opt.undofile = true
vim.opt.termguicolors = true vim.opt.termguicolors = true
vim.opt.isfname:append("@-@") vim.opt.isfname:append("@-@")
vim.opt.guitablabel = "\\[%N\\]\\ %t\\ %M"
vim.g.copilot_node_command = "node" vim.g.copilot_node_command = "/usr/bin/nodenv"
vim.g.copilot_assume_mapped = true vim.g.copilot_assume_mapped = true

1
.gitignore vendored
View File

@ -5,4 +5,3 @@
.vim/autoload/plug.vim .vim/autoload/plug.vim
.zsh/zsh-autosuggestions .zsh/zsh-autosuggestions
.zsh/zsh-syntax-highlighting .zsh/zsh-syntax-highlighting
.zsh/.zcompcache

View File

@ -287,14 +287,41 @@ alias autoremove='yay -Qqd | yay -Runs - && flatpak remove --delete-data --unuse
alias clear='echo "y" > /home/tiagorg/.dotfiles/.zsh/.zsh_clear && source /home/tiagorg/.dotfiles/.zsh/.zshrc' alias clear='echo "y" > /home/tiagorg/.dotfiles/.zsh/.zsh_clear && source /home/tiagorg/.dotfiles/.zsh/.zshrc'
alias c='clear' alias c='clear'
alias ref='echo -e -n "\x1b[\x35 q"' alias ref='echo -e -n "\x1b[\x35 q"'
alias repos='cd /home/tiagorg/repos/'
alias sus='su'
alias s='sudo'
alias grepf='grep -sirnIE' alias grepf='grep -sirnIE'
alias tl='telnet localhost'
alias py='python'
alias mkjava='javac -d bin/ src/**/*.java' alias mkjava='javac -d bin/ src/**/*.java'
alias core='echo "core.%e.%p" | sudo tee /proc/sys/kernel/core_pattern' alias core='echo "core.%e.%p" | sudo tee /proc/sys/kernel/core_pattern'
# uaveiro-leci repository
alias ua='cd /home/tiagorg/repos/uaveiro-leci'
alias ua-gi='nvim /home/tiagorg/repos/uaveiro-leci/.git/info/exclude'
alias aed='/home/tiagorg/repos/uaveiro-leci/2ano/1semestre/aed/setup.sh'
alias pclean='ls | grep -P "^.+\.(o|elf|map|sym)$" | xargs -d"\n" rm'
# ua vpn/ssh server
alias vpn='sudo snx -s go.ua.pt -u tiago.rgarcia@ua.pt'
alias vpnd='sudo snx -d'
source /home/tiagorg/.dotfiles/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh source /home/tiagorg/.dotfiles/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
source /home/tiagorg/.dotfiles/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source /home/tiagorg/.dotfiles/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#999999' ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#999999'
if [ -d /opt/pic32mx/bin ] ; then
export PATH=$PATH:/opt/pic32mx/bin
fi
if [ -d /opt/pic32mx/include ] ; then
export CPATH=$CPATH:/opt/pic32mx/include
fi
if which ruby >/dev/null && which gem >/dev/null; then
export PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH"
fi
eval "$(zoxide init --cmd cd zsh)" eval "$(zoxide init --cmd cd zsh)"
# Set up path to check personal bin, include and lib directory # Set up path to check personal bin, include and lib directory
@ -306,8 +333,3 @@ export CPATH=/home/tiagorg/.dotfiles/.local/include:$CPATH
export LD_LIBRARY_PATH=/home/tiagorg/.dotfiles/.local/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/home/tiagorg/.dotfiles/.local/lib:$LD_LIBRARY_PATH
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gcr/ssh 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)"

View File

@ -16,7 +16,7 @@ cd "$OLDPWD" || exit
# Install the required packages # Install the required packages
echo -e "\e[32m$1\e[0mInstalling the required packages" echo -e "\e[32m$1\e[0mInstalling the required packages"
yay -S stow gvim neovim zsh fzf bat clang nodejs npm zoxide pfetch ripgrep tree --noconfirm yay -S stow vim neovim zsh clang nodejs npm zoxide pfetch --noconfirm
# Clone the dotfiles if it's not the current directory # Clone the dotfiles if it's not the current directory
if [ "$(pwd)" != "$HOME/.dotfiles" ]; then if [ "$(pwd)" != "$HOME/.dotfiles" ]; then
@ -39,6 +39,9 @@ stow -d .dotfiles .
echo -e "\e[32m$1\e[0mSetting up Neovim" echo -e "\e[32m$1\e[0mSetting up Neovim"
echo -e "\e[32m$1\e[0mInstalling Packer" echo -e "\e[32m$1\e[0mInstalling Packer"
git clone --depth 1 "https://github.com/wbthomason/packer.nvim" "$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim" git clone --depth 1 "https://github.com/wbthomason/packer.nvim" "$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim"
stow -d .dotfiles .
echo -e "\e[32m$1\e[0mInstalling Plugins"
/bin/nvim --headless -c 'source /home/tiagorg/.dotfiles/.config/nvim/lua/tiagorg/packer.lua' -c 'PackerSync' -c 'qa!'
# Setup zsh # Setup zsh
echo -e "\e[32m$1\e[0mSetting up zsh" echo -e "\e[32m$1\e[0mSetting up zsh"