From b79cf558133e858a242be4989ae092758d9bdace Mon Sep 17 00:00:00 2001 From: TiagoRG Date: Sun, 24 Mar 2024 23:13:50 +0000 Subject: [PATCH] 24/3 update Signed-off-by: TiagoRG --- .config/nvim/lua/tiagorg/packer.lua | 9 ++-- .config/nvim/lua/tiagorg/remap.lua | 2 - .config/nvim/plugin/packer_compiled.lua | 5 -- .config/nvim/snippets/c.snippets | 10 ++++ .config/nvim/snippets/cpp.snippets | 5 +- .gitignore | 1 + .ideavimrc | 63 +++++++++++++++++++++++++ .local/bin/filelist | 2 +- .stow-local-ignore | 2 + .zsh/.zshrc | 6 ++- 10 files changed, 88 insertions(+), 17 deletions(-) create mode 100644 .ideavimrc diff --git a/.config/nvim/lua/tiagorg/packer.lua b/.config/nvim/lua/tiagorg/packer.lua index d5d9763..ed3cb20 100644 --- a/.config/nvim/lua/tiagorg/packer.lua +++ b/.config/nvim/lua/tiagorg/packer.lua @@ -48,6 +48,10 @@ return require('packer').startup(function(use) use "stevearc/aerial.nvim" use 'numToStr/Comment.nvim' use 'm4xshen/autoclose.nvim' + use({ + "kylechui/nvim-surround", + tag = "*", -- Use for stability; omit to use `main` branch for the latest features + }) -- Extras use 'mbbill/undotree' @@ -60,10 +64,6 @@ return require('packer').startup(function(use) use 'lewis6991/gitsigns.nvim' use 'romgrk/barbar.nvim' use { "akinsho/toggleterm.nvim", tag = '*' } - use({ - "kylechui/nvim-surround", - tag = "*", -- Use for stability; omit to use `main` branch for the latest features - }) use 'nvim-lualine/lualine.nvim' -- Misc @@ -83,5 +83,4 @@ return require('packer').startup(function(use) "nvim-telescope/telescope.nvim" } } - use 'mfussenegger/nvim-jdtls' end) diff --git a/.config/nvim/lua/tiagorg/remap.lua b/.config/nvim/lua/tiagorg/remap.lua index 1daca79..92546f6 100644 --- a/.config/nvim/lua/tiagorg/remap.lua +++ b/.config/nvim/lua/tiagorg/remap.lua @@ -1,8 +1,6 @@ --vim.keymap.set("n", "e", vim.cmd.E) vim.keymap.set("n", "w", vim.cmd.w) vim.keymap.set({ "n", "i" }, "", vim.cmd.w) -vim.keymap.set("n", "o", "o") -vim.keymap.set("n", "O", "O") vim.keymap.set("v", "J", ":m '>+1gv=gv") vim.keymap.set("v", "K", ":m '<-2gv=gv") diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua index 52baef7..4dd4fa0 100644 --- a/.config/nvim/plugin/packer_compiled.lua +++ b/.config/nvim/plugin/packer_compiled.lua @@ -189,11 +189,6 @@ _G.packer_plugins = { path = "/home/tiagorg/.local/share/nvim/site/pack/packer/start/nvim-cmp", url = "https://github.com/hrsh7th/nvim-cmp" }, - ["nvim-jdtls"] = { - loaded = true, - path = "/home/tiagorg/.local/share/nvim/site/pack/packer/start/nvim-jdtls", - url = "https://github.com/mfussenegger/nvim-jdtls" - }, ["nvim-lspconfig"] = { loaded = true, path = "/home/tiagorg/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", diff --git a/.config/nvim/snippets/c.snippets b/.config/nvim/snippets/c.snippets index 55a37af..9289333 100644 --- a/.config/nvim/snippets/c.snippets +++ b/.config/nvim/snippets/c.snippets @@ -1,3 +1,13 @@ +snippet detpic_analog_config + TRISBbits.TRISB4 = 1; + AD1PCFGbits.PCFG4 = 0; + AD1CON1bits.SSRC = 7; + AD1CON1bits.CLRASAM = 1; + AD1CON3bits.SAMC = 16; + AD1CON2bits.SMPI = 0; + AD1CHSbits.CH0SA = 4; + AD1CON1bits.ON = 1; + ## Main # main snippet main diff --git a/.config/nvim/snippets/cpp.snippets b/.config/nvim/snippets/cpp.snippets index 3bd1f00..550b46f 100644 --- a/.config/nvim/snippets/cpp.snippets +++ b/.config/nvim/snippets/cpp.snippets @@ -3,8 +3,7 @@ extends c ## Main # main() snippet mainn - int main() - { + int main() { ${0} return 0; } @@ -221,7 +220,7 @@ snippet lld snippet try try { - }catch(${1}) { + } catch(${1}) { } # auto function diff --git a/.gitignore b/.gitignore index 8cb97fc..e0c0325 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ .vim/.netrwhist .vim/undodir/ .vim/pack/ +.vim/autoload/plug.vim .zsh/zsh-autosuggestions .zsh/zsh-syntax-highlighting diff --git a/.ideavimrc b/.ideavimrc new file mode 100644 index 0000000..1322fa9 --- /dev/null +++ b/.ideavimrc @@ -0,0 +1,63 @@ +set clipboard+=unnamed + +set number +set relativenumber +set signcolumn=auto +set cursorline + +set smartindent +set tabstop=4 +set shiftwidth=4 +set ls=2 + +set hlsearch +set incsearch +set ignorecase +set scrolloff=10 + +set wildmenu + +let g:mapleader=" " + +syntax on +colorscheme onedark + +nnoremap w :w + +nnoremap h +nnoremap j +nnoremap k +nnoremap l + +xnoremap J :move '>+1gv=gv +xnoremap K :move '<-2gv=gv +nnoremap J mzJ`z + +xnoremap >gv +xnoremap y "+y +vnoremap y "+y +nnoremap Y "+Y +nnoremap d "_d +vnoremap d "_d + +nnoremap Q @@ + +vnoremap rs :s/\<\>//gI +nnoremap ra :%s/\<\>//gI +nnoremap rc :%s/\<\>//gcI + +nnoremap m :!make + +augroup SearchHighlight + autocmd! + autocmd CmdlineLeave /,\? :nnoremap :noh + autocmd CmdlineChanged /,\? :nnoremap :noh +augroup END + + +Plug 'tpope/vim-surround' diff --git a/.local/bin/filelist b/.local/bin/filelist index 6ea6e00..cbab277 100755 --- a/.local/bin/filelist +++ b/.local/bin/filelist @@ -1,4 +1,4 @@ -#!/bin/python3.11 +#!/bin/python3 import os from sys import argv diff --git a/.stow-local-ignore b/.stow-local-ignore index 2aa2e5c..b2c852b 100644 --- a/.stow-local-ignore +++ b/.stow-local-ignore @@ -27,3 +27,5 @@ setup.sh !.config/nvim .local/* !.local/bin +!.local/include +!.local/lib diff --git a/.zsh/.zshrc b/.zsh/.zshrc index 0ba36d4..17ece46 100644 --- a/.zsh/.zshrc +++ b/.zsh/.zshrc @@ -318,6 +318,10 @@ 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)" # Set up path to check personal bin, include and lib directory @@ -326,6 +330,6 @@ export CPATH=/home/tiagorg/.dotfiles/.local/include:$CPATH # For C only: C_INCLUDE_PATH # For C++ only: CPLUS_INCLUDE_PATH # For Obj-C: OBJC_INCLUDE_PATH -export LIBRARY_PATH=/home/tiagorg/.dotfiles/.local/lib:$LIBRARY_PATH +export LD_LIBRARY_PATH=/home/tiagorg/.dotfiles/.local/lib:$LD_LIBRARY_PATH export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gcr/ssh