Compare commits
3 Commits
3b03fb6cd2
...
32902e23df
Author | SHA1 | Date |
---|---|---|
Tiago Garcia | 32902e23df | |
Tiago Garcia | e4300e0a78 | |
Tiago Garcia | 6829cde082 |
|
@ -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"} },
|
['"'] = { 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 = "$$", enabled_filetypes = {"tex"} },
|
["$"] = { escape = true, close = true, pair = "$$", enabled_filetypes = {"tex"} },
|
||||||
},
|
},
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -10,7 +10,7 @@ require('lualine').setup {
|
||||||
},
|
},
|
||||||
ignore_focus = {},
|
ignore_focus = {},
|
||||||
always_divide_middle = true,
|
always_divide_middle = true,
|
||||||
globalstatus = false,
|
globalstatus = true,
|
||||||
refresh = {
|
refresh = {
|
||||||
statusline = 10,
|
statusline = 10,
|
||||||
tabline = 1000,
|
tabline = 1000,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
local builtin = require('telescope.builtin')
|
local builtin = require('telescope.builtin')
|
||||||
local trouble = require('trouble.providers.telescope')
|
local trouble = require("trouble.sources.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_with_trouble, {})
|
vim.keymap.set('n', '<leader>pe', trouble.open, {})
|
||||||
|
|
||||||
-- Help pickers
|
-- Help pickers
|
||||||
vim.keymap.set('n', '<leader>sh', builtin.help_tags, {})
|
vim.keymap.set('n', '<leader>sh', builtin.help_tags, {})
|
||||||
|
|
|
@ -1,16 +1,19 @@
|
||||||
require("trouble").setup {
|
require("trouble").setup {
|
||||||
position = "bottom",
|
position = "bottom",
|
||||||
|
modes = {
|
||||||
|
diagnostics = {
|
||||||
auto_open = true,
|
auto_open = true,
|
||||||
auto_close = true,
|
auto_close = false,
|
||||||
auto_preview = false,
|
auto_preview = false
|
||||||
icons = true,
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Keybindings
|
-- Keybindings
|
||||||
vim.keymap.set("n", "<leader>x", "<cmd>TroubleToggle workspace_diagnostics<cr>", { noremap = true, silent = true })
|
vim.keymap.set("n", "<leader>x", "<cmd>Trouble 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 })
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
require("wrapping").setup()
|
local opts = {
|
||||||
|
|
||||||
opts = {
|
|
||||||
auto_set_mode_filetype_allowlist = {
|
auto_set_mode_filetype_allowlist = {
|
||||||
"asciidoc",
|
"asciidoc",
|
||||||
"gitcommit",
|
"gitcommit",
|
||||||
|
@ -14,3 +12,5 @@ opts = {
|
||||||
},
|
},
|
||||||
soft_wrap = true,
|
soft_wrap = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require("wrapping").setup(opts)
|
||||||
|
|
|
@ -7,13 +7,13 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_exec([[
|
vim.api.nvim_create_autocmd({"CmdlineLeave", "CmdlineChanged"}, {
|
||||||
augroup SearchHighlight
|
group = vim.api.nvim_create_augroup("SearchHighlight", { clear = true }),
|
||||||
autocmd!
|
pattern = { "/", "\\?" },
|
||||||
autocmd CmdlineLeave /,\? :nnoremap <buffer> <Esc> :noh<CR>
|
callback = function()
|
||||||
autocmd CmdlineChanged /,\? :nnoremap <buffer> <Esc> :noh<CR>
|
vim.cmd([[nnoremap <buffer> <Esc> :noh<CR>]])
|
||||||
augroup END
|
end
|
||||||
]], false)
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
desc = "Highlight yanked text",
|
desc = "Highlight yanked text",
|
||||||
|
|
|
@ -9,6 +9,10 @@ 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 {
|
||||||
|
@ -69,22 +73,4 @@ 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)
|
||||||
|
|
|
@ -30,7 +30,6 @@ 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 = "/usr/bin/nodenv"
|
vim.g.copilot_node_command = "node"
|
||||||
vim.g.copilot_assume_mapped = true
|
vim.g.copilot_assume_mapped = true
|
||||||
|
|
|
@ -5,3 +5,4 @@
|
||||||
.vim/autoload/plug.vim
|
.vim/autoload/plug.vim
|
||||||
.zsh/zsh-autosuggestions
|
.zsh/zsh-autosuggestions
|
||||||
.zsh/zsh-syntax-highlighting
|
.zsh/zsh-syntax-highlighting
|
||||||
|
.zsh/.zcompcache
|
||||||
|
|
32
.zsh/.zshrc
32
.zsh/.zshrc
|
@ -287,41 +287,14 @@ 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
|
||||||
|
@ -333,3 +306,8 @@ 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)"
|
||||||
|
|
5
setup.sh
5
setup.sh
|
@ -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 vim neovim zsh clang nodejs npm zoxide pfetch --noconfirm
|
yay -S stow gvim neovim zsh fzf bat clang nodejs npm zoxide pfetch ripgrep tree --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,9 +39,6 @@ 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"
|
||||||
|
|
Loading…
Reference in New Issue