diff --git a/.zshrc b/.zshrc deleted file mode 100644 index 128ac07..0000000 --- a/.zshrc +++ /dev/null @@ -1,126 +0,0 @@ -# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. -# Initialization code that may require console input (password prompts, [y/n] -# confirmations, etc.) must go above this block; everything else may go below. -if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" -fi - -#FZF -export FZF_DEFAULT_COMMAND="rg --files --hidden --follow --no-ignore-vcs" -export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" -export FZF_DEFAULT_OPTS="--height 96% --reverse --preview 'cat {}'" - -#source /path/to/zsh-z.plugin.zsh -#autoload -U compinit && compinit - -# If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH - -# Path to your oh-my-zsh installation. -export ZSH="/home/fabian/.oh-my-zsh" - -# Set name of the theme to load --- if set to "random", it will -# load a random theme each time oh-my-zsh is loaded, in which case, -# to know which specific one was loaded, run: echo $RANDOM_THEME -# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes -ZSH_THEME="powerlevel10k/powerlevel10k" - -POWERLEVEL9K_MODE="nerdfont-complete" - -# Set list of themes to pick from when loading at random -# Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in $ZSH/themes/ -# If set to an empty array, this variable will have no effect. -# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) - -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. -# Case-sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment one of the following lines to change the auto-update behavior -# zstyle ':omz:update' mode disabled # disable automatic updates -# zstyle ':omz:update' mode auto # update automatically without asking -# zstyle ':omz:update' mode reminder # just remind me to update when it's time - -# Uncomment the following line to change how often to auto-update (in days). -# zstyle ':omz:update' frequency 13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - -# Uncomment the following line to enable command auto-correction. -ENABLE_CORRECTION="true" - -# Uncomment the following line to display red dots whilst waiting for completion. -# You can also set it to another string to have that shown instead of the default red dots. -# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" -# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) -# COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. -# HIST_STAMPS="mm/dd/yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# Which plugins would you like to load? -# Standard plugins can be found in $ZSH/plugins/ -# Custom plugins may be added to $ZSH_CUSTOM/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. -plugins=(git zsh-autosuggestions zsh-syntax-highlighting zsh-z) -source $ZSH/oh-my-zsh.sh - -# User configuration - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - - #Preferred editor for local and remote sessions - if [[ -n $SSH_CONNECTION ]]; then - export EDITOR='nvim' - else - export EDITOR='nano' - fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" -#exa -alias -g ll="exa -l -g --icons -h" -alias -g lla="exa -lahg --icons" -alias -g llh="exa -l -g --icons --tree --level=2" -alias fzfi="rg --files --hidden --follow --no-ignore-vcs -g '!{node_modules,.git}' | fzf" -alias n="nvim" -alias g="git" -# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. -[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh diff --git a/docs/estructura.md b/docs/estructura.md new file mode 100644 index 0000000..57c041d --- /dev/null +++ b/docs/estructura.md @@ -0,0 +1,22 @@ +Esta es la estructura inicial la iré cambiando con el tiempo + +``` +📁 nvim +├── 📁 core +│ ├── 📄 colors.lua +│ ├── 📄 keys.lua +│ └── 📄 settings.lua +├── 📁 plugins +│ └─ 📁 configs +│ └─ init.lua +├── 📁 themes +│ ├── 📄 ayu.lua +├── .gitignore +└── 📄 init.lua +``` + +- **core/**: Esta carpeta contiene archivos relacionados con la configuración general de Neovim, como ajustes de colores, atajos de teclado, configuración de plugins, y la línea de estado. + +- **plugins/**: Aquí se encuentran los archivos de configuración específicos. + +- **themes/**: En esta carpeta se almacenan los archivos de configuración de temas. diff --git a/general/colors.vim b/general/colors.vim deleted file mode 100644 index 086b4ca..0000000 --- a/general/colors.vim +++ /dev/null @@ -1,52 +0,0 @@ -"the most basic configurations -syntax on - -set termguicolors -set background=dark - - "hi SignColumn guibg=none - "hi CursorLineNR guibg=none - "highlight Normal guibg=none - "highlight LineNr guifg=#677693 - "highlight netrwDir guifg=#677693 - "highlight qfFileName guifg=#aed75f -"hi CursorLineNR guifg=#F99575 -set cursorline -set cursorlineopt=number - -"Menu autocompletado -highlight Pmenu guifg=#dee1e4 guibg=none -"highlight PmenuSel guibg=#FAB795 guifg=black - -"Coc Error Color -"hi! CocErrorSign guifg=#9D2B25 - -" TSX sintax -" dark red -"hi tsxTagName guifg=#FAB795 -"hi tsxComponentName guifg=#2DC3DA cterm=italic -"hi tsxCloseComponentName guifg=#84EEA2 cterm=italic - -" orange -"hi tsxCloseString guifg=#F99575 -"hi tsxCloseTag guifg=#84EEA2 -"hi tsxCloseTagName guifg=#84EEA2 -"hi tsxAttributeBraces guifg=#C14A4A -"hi tsxEqual guifg=#84EEA2 - -" yellow -"hi tsxAttrib guifg=#2DC3DA cterm=italic - -" light-grey -"hi tsxTypeBraces guifg=#2DC3DA cterm=italic -" dark-grey -"hi tsxTypes guifg=#2DC3DA cterm=italic - -"hi ReactState guifg=#C14A4A cterm=italic -"hi ReactProps guifg=#FAB795 -""hi ApolloGraphQL guifg=#CB886B -"hi Events ctermfg=204 guifg=#2DC3DA -"hi ReduxKeywords ctermfg=204 guifg=#C678DD -"hi ReduxHooksKeywords ctermfg=204 guifg=#C176A7 -"hi WebBrowser ctermfg=204 guifg=#2DC3DA -"hi ReactLifeCycleMethods ctermfg=204 guifg=#D19A66 diff --git a/general/keys.vim b/general/keys.vim deleted file mode 100644 index 3e77df3..0000000 --- a/general/keys.vim +++ /dev/null @@ -1,103 +0,0 @@ -"Use F5 to refresh your editor with the config file that you specify here -nmap :source ~/.config/nvim/init.vim -vmap :source ~/.config/nvim/init.vim - -"Desabilita la navegación con las flechas -noremap -noremap -noremap -noremap - -"Las fechas reasignan el ancho y alto de la ventana -nnoremap :vertical resize +5 -nnoremap :vertical resize -5 -nnoremap :resize +5 -nnoremap :resize -5 - -"Configuración archivos -nnoremap w :w -nnoremap q :q -nnoremap Q :q! - -"Salir del modo Insert -imap jj - -tmap - -nmap (NERDTermToggle) -tmap (NERDTermToggle) - -" Easy Motion -noremap f (easymotion-s2) - -" Navegación con Tmux -nnoremap :TmuxNavigateLeft -nnoremap :TmuxNavigateDown -nnoremap :TmuxNavigateUp -nnoremap :TmuxNavigateRight - -nnoremap :bnext -nnoremap :bprevious - -"Cerra buffer y cerrar buffer sin guardar -nnoremap qq :bdelete -nnoremap qb :bdelete! -nnoremap t :tabe - -"vertical split -"horizontal split -nnoremap vs :vsp -nnoremap sp :sp - -" Limpiar los resultados de busqueda -nnoremap // :noh - -"----Telescope -"Buscar archivos - nnoremap f lua require('telescope.builtin').find_files() - "Buscar dentro del projecto cualquier palabra - nnoremap a lua require('telescope.builtin').live_grep() - - nnoremap mf lua require('telescope.builtin').marks() - "Lista de commits - nnoremap ls lua require('telescope.builtin').git_commits() - "Buscar archivos de git - nnoremap ag lua require('telescope.builtin').git_files() - "Lista los archivos o ventanas cerradas - nnoremap of lua require('telescope.builtin').oldfiles() - "Lista buffers o pestañas abiertos - nnoremap b lua require('telescope.builtin').buffers() -"---------- -"Todo Busqueda telescope -nmap td :TodoTelescope - -"Modo Visual indent -vmap < > >gv - -"Git Diff View -nnoremap df :DiffviewOpen -nnoremap dx :DiffviewClose - -"Git Stage hunk: Para agregar a stage lineas de cambios individuales o al contrario -nnoremap hs :Gitsigns stage_hunk -nnoremap hu :Gitsigns undo_stage_hunk - -"Git Stage lines -vnoremap hs :Gitsigns stage_hunk -nnoremap hu :Gitsigns undo_stage_hunk - -"GitSigns Preview: "Muestra una previsualización de los cambios entre lineas -nnoremap hj :Gitsigns preview_hunk - -"Debuger -nmap db :DapToggleBreakpoint "Punto de espera -nmap dc :DapContinue "Lanzar debugger -nmap ds :DapTerminate "Detener debuger - -"Lanzar y cierra interfaz debugger -nmap du :lua require("dapui").toggle() - -"Neotree -nnoremap p :NeoTreeFocusToggle -nnoremap g :NeoTreeFocusToggle git_status diff --git a/general/settings.vim b/general/settings.vim deleted file mode 100644 index 7d7420c..0000000 --- a/general/settings.vim +++ /dev/null @@ -1,61 +0,0 @@ -"set the map leader -let mapleader = " " - -set encoding=utf-8 -set mouse= -set clipboard=unnamedplus -"set clipboard=unnamedplus -set noerrorbells -set nolist -set cmdheight=1 -set sw=2 -set expandtab -set smartindent -set breakindent -set number -set rnu -set numberwidth=2 -set noswapfile -set nobackup -set undodir=~/.config/nvim/.undodir/ -set undofile -set incsearch -set ignorecase -set cursorline -set splitbelow -set splitright -set noshowmode - -"Habilita el Buffer para archivos grandes de JSX -autocmd BufEnter *.{js,jsx,ts,tsx} :syntax sync fromstart -autocmd BufLeave *.{js,jsx,ts,tsx} :syntax sync clear - -"autocmd BufNewFile,BufRead *.tsx,*.jsx set filetype=typescriptreact - -"---formatear con Eslint - autocmd BufRead,BufNewFile *.astro set filetype=astro - autocmd BufWritePre *.js,*.jsx,*.ts,*.tsx,*.astro EslintFixAll -"----- - -"---formatear archivos de go con GoFmt al guardar - augroup go - autocmd! - autocmd BufWritePre *.go :silent! GoFmt - "Esta linea formatea los archivos de go con una identacion de 4 espacios - "autocmd FileType go setlocal shiftwidth=4 softtabstop=4 tabstop=4 expandtab - augroup END -"------ - -lua </dev/null | tr -d '\n'") -endfunction - -function! StatuslineGit() - let l:branchname = GitBranch() - return strlen(l:branchname) > 0?' '.l:branchname.' ':'' -endfunction - -set laststatus=2 -set noshowmode -set statusline= -set statusline+=%0*\ %n\ " Buffer number - -set statusline+=%1*\ %<%F%m%r%h%w\ " File path, modified, readonly, helpfile, preview - -set statusline+=%#LineNr# -"set statusline+=\ %t -set statusline+=%= " Right Side -set statusline+=%{StatuslineGit()} -"set statusline+=%2*\ col:\ %02v\ " Column number -set statusline+=%1*\ \ %02l/%L\ (%3p%%)\ " Line number / total lines, percentage of document -set statusline+=%0*\ %{toupper(g:currentmode[mode()])}\ " The current mode - -hi User1 ctermfg=007 ctermbg=239 guibg=#4e4e4e guifg=#adadad -hi User2 ctermfg=007 ctermbg=236 guibg=#303030 guifg=#adadad -hi User3 ctermfg=236 ctermbg=236 guibg=#303030 guifg=#303030 -hi User4 ctermfg=239 ctermbg=239 guibg=#4e4e4e guifg=#4e4e4e diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..816cff4 --- /dev/null +++ b/init.lua @@ -0,0 +1,24 @@ +local core = require("core") +local lazy = require("plugins.lazy") + + +--[[ + TODO: + - [] Documentación en Español + - [x] Terminar la confuración de todos los plugins restantes + - [x] Hacer la configuración de autoformateo de go y js + - [x] Realizar el menu de temas + - [x] Mejorar la configuración de lazy + - [x] Configuracion de cmp inicial + - [x] Configuracion de algunos plugins de treesitter + - [x] Autopairs plugin de treesitter + PLUGINS: + -x git-signs + -x vim-visual-multi + -x markdown-preview + -x debuger + + FIX: -[x] Error en los TABS de cmp + - Esta viendo la carpeta node_modules +--]] +-- diff --git a/init.vim b/init.vim deleted file mode 100644 index 0406e0a..0000000 --- a/init.vim +++ /dev/null @@ -1,39 +0,0 @@ -" First list plugins to install -source ~/.config/nvim/plug.vim -"source ~/.config/nvim/general/status-line.vim - -"Import the general settings -source ~/.config/nvim/general/settings.vim -source ~/.config/nvim/general/keys.vim - -"Theme -source ~/.config/nvim/themes/zenbones.lua -source ~/.config/nvim/general/colors.vim - -"Import plugin settings -source ~/.config/nvim/plug-settings/easy-motion.vim -source ~/.config/nvim/plug-settings/web-devicons.vim - -"LSP -source ~/.config/nvim/plug-settings/mason.lua -source ~/.config/nvim/plug-settings/lsp.vim -source ~/.config/nvim/plug-settings/nvim-cmp.vim -source ~/.config/nvim/plug-settings/lspkind.lua - -"Lua Configs Plugins -"source ~/.config/nvim/plug-settings/bufferline.lua -source ~/.config/nvim/plug-settings/lualine.lua -source ~/.config/nvim/plug-settings/autopairs.lua -source ~/.config/nvim/plug-settings/neo-tree.lua -source ~/.config/nvim/plug-settings/treesitter.lua -source ~/.config/nvim/plug-settings/telescope.lua - -source ~/.config/nvim/plug-settings/gitsigns.lua -source ~/.config/nvim/plug-settings/black-indent.lua -source ~/.config/nvim/plug-settings/todo-comments.lua -source ~/.config/nvim/plug-settings/null-ls.lua -source ~/.config/nvim/plug-settings/dap.lua -source ~/.config/nvim/plug-settings/go.lua -source ~/.config/nvim/plug-settings/tab-nine.lua - -source ~/.config/nvim/plug-settings/luaSnips.lua diff --git a/keymaps.md b/keymaps.md deleted file mode 100644 index 8734527..0000000 --- a/keymaps.md +++ /dev/null @@ -1,162 +0,0 @@ -## Comandos por defecto de nvim - -H => Moverse hacia la parte superior de la pantalla - -M => Moverse hacia el centro de la pantalla - -L => Moverse hacia la parte inferio de la pantalla - -w => Hacia el inicio de la siguiente palabra - -W => Salta el inicio de la siguiente palabra(con puntuación) - -e => Salta hacia el final de la palabra - -E => Salta hacia el final de la palabra(con puntuación) - -b => regresar al inicio de la palabra - -B => regresar al inicio de la palabra(con puntuación) - -0 => salta al inicio de la linea - -$ => salta al final de la linea - -gg => salta hacia la primera linea del documento - -G => ir a la ultima linea del documento - -Ctrl + e => mover la pantalla hacia abajo una linea - -Ctrl + y => mover la pantalla una linea arriba - -Ctrl + b => retroceder una pantalla - -Ctrl + f => avanzar una pantalla - -Ctrl + d => cursor a media pantalla - -Ctrl + u => retroceder cursor media pantalla - -## Modo Insertar - -I => insertar al comienzo de la linea - -a => despues del cursor - -A => insertar al final de la linea - -o => insertar una nueva linea por debajo - -O => insetar una nueva linea encima de la linea actual - -## Modo Editar - -r => remplazar - -r - reemplazar un carácter - -R - reemplazar más de un carácter, hasta que se presione ESC. - -J - juntar siguiente línea con la actual - -gJ - une la línea de abajo a la actual sin espacio entre ellas - -gwip - párrafo de reflujo - -g~ - cambiar caso a movimiento - -gu - cambiar a minúsculas hasta movimiento - -gU - cambiar a mayúsculas hasta el movimiento - -cc - cambiar (reemplazar) toda la línea - -ciw - cambiar (reemplazar) palabra completa - -cw or ce - cambiar (reemplazar) una palabra - -s - eliminar carácter y reemplazar texto - -S - eliminar línea y reemplazar texto (igual que el comando cc) - -xp - transponer dos letras (suprimir y pegar) - -u - deshacer - -### Atajos personalizados - -**jj** => Salir del modo insert - -**K** => Mostrar Documentación -**
leader + le** => Mostrar errores -**
leader + er** => Mostrar errores en menú - -**f** => Busqueda de palabra dentro del archivo x2 -**
Tab** => Siguiente buffer -**
shift + Tab** => Buffer anterior -**
leader + t** => Nuevo archivo o buffer -**
control + l** => cambiar pestaña activa a la derecha -**
control + h** => cambiar pestaña activa a la izquierda - -### Archivos de buscador Tree - -**leader + nt** => Abre barra del busqueda de archivos - -**leader + nc** => Cierra barra de busqueda - -a => Crear archivo nuevo - -r => Renombrar Archivo - -d => Borrar Archivo - -c => Copiar Archivo - -x => Cortar Archivo - -p => Pegar Archivo - -q => Cerrar Tree - -f => Filtrar archivos - -F => Cancelar filtrado - -### Archivos y pestañas - -**leader + w** => Guardado de archivos -
**leader + q** => Cerrar archivos -
**leader + Q** => Cerrar archivos sin guardar -
**leader + qq** => Cerrar pestaña actual - -**leader + vs** => nuevo split de la pantalla actual en vertical -
**leader + sp** => nuevo split de la pantalla actual en horizontal - -### Busqueda - -/ => Busqueda de palabras o frases -
// => Limpiar los resultado de busqueda - -**leader + f** => Buscar archvos -**
leader + a** => Buscar palabras -**
leader + ag** => Buscar archivos de git -**
leader + ls** => Lista de commits -**
leader + b** => Lista de buffers -**
leader + td** => Lista de TODOS Comments - -### git - -**:g** => Acceder a los cambios del repositorio -**
:g + [codigoGit]** => ejecutar cualquier commando en git - -### Comentarios (NERD Commenter) - -**[selección] leader + cc** => Comentar lineas enteras -**
[selección] leader + ci** => Comentar lineas de manera individual -**
[selección] leader + cs** => Comentar lineas en grupo -**
[selección] leader + cu** => Descomentar - -### Terminal - -**control + t** => Abir terminal diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..e9710ef --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,52 @@ +{ + "LuaSnip": { "branch": "master", "commit": "e77fa9ad0b1f4fc6cddf54e51047e17e90c7d7ed" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-cmdline": { "branch": "main", "commit": "5af1bb7d722ef8a96658f01d6eb219c4cf746b32" }, + "cmp-dap": { "branch": "master", "commit": "d16f14a210cd28988b97ca8339d504533b7e09a4" }, + "cmp-emmet": { "branch": "main", "commit": "1b29294e9126c493a28b4b967c227edd77ed04d3" }, + "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp-tabnine": { "branch": "main", "commit": "7fa0459b0cc0498375c5a1e14fb8d21d130bb198" }, + "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, + "colorizer": { "branch": "master", "commit": "72790a003d5a706c287486a1a81e3a6b32158b54" }, + "friendly-snippets": { "branch": "main", "commit": "631f79e346b0b3203d2ce3eae619ca8d612e5463" }, + "gitsigns.nvim": { "branch": "main", "commit": "e5edefd9976039f5352e0c900f35206770b33a2d" }, + "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, + "lazy.nvim": { "branch": "main", "commit": "bb5cc9ef3bbb17541929b745f74551c900188099" }, + "lspkind.nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, + "lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" }, + "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "43f2ddf0b5f544d9bb20e24b8ff76b79f2a07ab0" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "6fe5eac6db65fdbad68bf638dea0a849ccb63fd7" }, + "mason.nvim": { "branch": "main", "commit": "057ac5ca159c83e302a55bd839a96ff1ea2396db" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "8d485aab32da9b8841d4af977f992b82b14af469" }, + "neogen": { "branch": "main", "commit": "9c17225aac94bdbf93baf16e1b2d2c6dcffb0901" }, + "nerdcommenter": { "branch": "master", "commit": "1fe9e1cfea9bb0dbc77174d776759ed67899ee50" }, + "nerdterm": { "branch": "main", "commit": "5fa91afa32acbcc58a492d3dd59a8aef8d71295a" }, + "nightfox.nvim": { "branch": "main", "commit": "a53ff3f99c3cf4e598c5febad367fd3cad341b90" }, + "npairs-integrate-upair": { "branch": "main", "commit": "9e898dcb1d648796663791b78ae348161c4031f8" }, + "nui.nvim": { "branch": "main", "commit": "698e75814cd7c56b0dd8af4936bcef2d13807f3c" }, + "null-ls.nvim": { "branch": "main", "commit": "33b853a3933eed3137cd055aac4e539e69832ad0" }, + "nvim-autopairs": { "branch": "master", "commit": "7747bbae60074acf0b9e3a4c13950be7a2dff444" }, + "nvim-cmp": { "branch": "main", "commit": "11102d3db12c7f8b35265ad0e17a21511e5b1e68" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" }, + "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, + "nvim-dap-ui": { "branch": "master", "commit": "749bfe12d1447703899fa823c1c075fbe2d42c24" }, + "nvim-lspconfig": { "branch": "master", "commit": "427378a03ffc1e1bc023275583a49b1993e524d0" }, + "nvim-treesitter": { "branch": "master", "commit": "25bdc313c732cb0a2b612b9364eab8dc2acad76a" }, + "nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" }, + "nvim-ts-rainbow2": { "branch": "master", "commit": "1ffe68cdd594633dfee0762feebfef81ed6f1fbb" }, + "nvim-web-devicons": { "branch": "master", "commit": "4ec26d67d419c12a4abaea02f1b6c57b40c08d7e" }, + "plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" }, + "telescope.nvim": { "branch": "master", "commit": "713d26b98583b160b50fb827adb751f768238ed3" }, + "tmux.nvim": { "branch": "main", "commit": "b6da35847df972f50df27d938b6e5ea09bcc8391" }, + "todo-comments.nvim": { "branch": "main", "commit": "8febc60a76feefd8203077ef78b6a262ea1a41f9" }, + "trouble.nvim": { "branch": "main", "commit": "d56bfc0c501ced4002a57cb60433362fb2ce9c4d" }, + "ultimate-autopair.nvim": { "branch": "main", "commit": "28592a9fb36473fff5467feb5d728701e6291e3a" }, + "vim-easymotion": { "branch": "master", "commit": "b3cfab2a6302b3b39f53d9fd2cd997e1127d7878" }, + "vim-fugitive": { "branch": "master", "commit": "5f0d280b517cacb16f59316659966c7ca5e2bea2" }, + "vim-move": { "branch": "master", "commit": "a4bbedda7ef516b4a1b74d145cd642297e82e800" }, + "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, + "vim-visual-multi": { "branch": "master", "commit": "724bd53adfbaf32e129b001658b45d4c5c29ca1a" } +} \ No newline at end of file diff --git a/lua/core/colors.lua b/lua/core/colors.lua new file mode 100644 index 0000000..0eb0e19 --- /dev/null +++ b/lua/core/colors.lua @@ -0,0 +1,12 @@ +local opt = vim.opt + +-- Configurar termguicolors y background +opt.termguicolors = true +opt.background = "dark" + +-- Configurar cursorline y cursorlineopt +opt.cursorline = true +opt.cursorlineopt = 'number' + +-- Configurar menú de autocompletado a trasparente +vim.cmd('highlight Pmenu guifg=#dee1e4 guibg=none') diff --git a/lua/core/init.lua b/lua/core/init.lua new file mode 100644 index 0000000..b51632b --- /dev/null +++ b/lua/core/init.lua @@ -0,0 +1,10 @@ +local M = {} + +-- Importar el módulo general y todos sus archivos +M.general = { + settings = require('core.settings'), + colors = require('core.colors'), + keys = require('core.keys') +} + +return M diff --git a/lua/core/keys.lua b/lua/core/keys.lua new file mode 100644 index 0000000..bc417a5 --- /dev/null +++ b/lua/core/keys.lua @@ -0,0 +1,103 @@ +local a = vim.api + +-- Deshabilita la navegación con las flechas +a.nvim_set_keymap('n', '', '', { noremap = true }) +a.nvim_set_keymap('n', '', '', { noremap = true }) +a.nvim_set_keymap('n', '', '', { noremap = true }) +a.nvim_set_keymap('n', '', '', { noremap = true }) + +-- Las flechas reasignan el ancho y alto de la ventana +a.nvim_set_keymap('n', '', ':vertical resize +5', { noremap = true, silent = true }) +a.nvim_set_keymap('n', '', ':vertical resize -5', { noremap = true, silent = true }) +a.nvim_set_keymap('n', '', ':resize +5', { noremap = true, silent = true }) +a.nvim_set_keymap('n', '', ':resize -5', { noremap = true, silent = true }) + +-- Configuración archivos +a.nvim_set_keymap('n', 'w', ':w', { noremap = true }) +a.nvim_set_keymap('n', 'q', ':q', { noremap = true }) +a.nvim_set_keymap('n', 'Q', ':q!', { noremap = true }) + +-- Salir del modo Insert +a.nvim_set_keymap('i', 'jj', '', { noremap = true }) + +-- Salir del modo terminal +a.nvim_set_keymap('t', '', '', { noremap = true }) + +-- NERDTree +a.nvim_set_keymap('n', '', '(NERDTermToggle)', { noremap = true }) +a.nvim_set_keymap('t', '', '(NERDTermToggle)', { noremap = true }) + +-- Easy Motion +a.nvim_set_keymap('n', 'f', '(easymotion-s2)', {}) + +-- Navegación con Tmux +a.nvim_set_keymap('n', '', ':TmuxNavigateLeft', { noremap = true, silent = true }) +a.nvim_set_keymap('n', '', ':TmuxNavigateDown', { noremap = true, silent = true }) +a.nvim_set_keymap('n', '', ':TmuxNavigateUp', { noremap = true, silent = true }) +a.nvim_set_keymap('n', '', ':TmuxNavigateRight', { noremap = true, silent = true }) + +-- Navegación entre buffers +a.nvim_set_keymap('n', '', ':bnext', { noremap = true }) +a.nvim_set_keymap('n', '', ':bprevious', { noremap = true }) + +-- Cerrar buffer y cerrar buffer sin guardar +a.nvim_set_keymap('n', 'qq', ':bdelete', { noremap = true }) +a.nvim_set_keymap('n', 'qb', ':bdelete!', { noremap = true }) +a.nvim_set_keymap('n', 't', ':tabe', { noremap = true }) + +-- Vertical split +a.nvim_set_keymap('n', 'vs', ':vsp', { noremap = true }) +-- Horizontal split +a.nvim_set_keymap('n', 'sp', ':sp', { noremap = true }) + +-- Limpiar los resultados de búsqueda +a.nvim_set_keymap('n', '//', ':noh', { silent = true }) + +-- Telescope +-- Buscar archivos +a.nvim_set_keymap('n', 'f', 'lua require(\'telescope.builtin\').find_files()', { noremap = true }) +-- Buscar dentro del proyecto cualquier palabra +a.nvim_set_keymap('n', 'a', 'lua require(\'telescope.builtin\').live_grep()', { noremap = true }) +a.nvim_set_keymap('n', 'mf', 'lua require(\'telescope.builtin\').marks()', { noremap = true }) +-- Lista de commits +a.nvim_set_keymap('n', 'ls', 'lua require(\'telescope.builtin\').git_commits()', { noremap = true }) +-- Buscar archivos de git +a.nvim_set_keymap('n', 'ag', 'lua require(\'telescope.builtin\').git_files()', { noremap = true }) +-- Lista los archivos o ventanas cerradas +a.nvim_set_keymap('n', 'of', 'lua require(\'telescope.builtin\').oldfiles()', { noremap = true }) +-- Lista buffers o pestañas abiertos +a.nvim_set_keymap('n', 'b', 'lua require(\'telescope.builtin\').buffers()', { noremap = true }) + +-- Todo Busqueda telescope +a.nvim_set_keymap('n', 'td', ':TodoTelescope', {}) + +-- Modo Visual indent +a.nvim_set_keymap('v', '<', '', '>gv', { silent = true }) + + +------ GIT SIGNS +-- Git Stage hunk: Para agregar a stage lineas de cambios individuales o al contrario +a.nvim_set_keymap('n', 'hs', ':Gitsigns stage_hunk', { noremap = true }) +a.nvim_set_keymap('n', 'hu', ':Gitsigns undo_stage_hunk', { noremap = true }) +-- Git Stage entre lineas +a.nvim_set_keymap('v', 'hs', ':Gitsigns stage_hunk', { noremap = true }) +a.nvim_set_keymap('n', 'hu', ':Gitsigns undo_stage_hunk', { noremap = true }) +-- GitSigns Preview: "Muestra una previsualización de los cambios entre lineas +a.nvim_set_keymap('n', 'hp', ':Gitsigns preview_hunk', { noremap = true }) + +a.nvim_set_keymap('n', 'h', ':Gitsigns prev_hunk', { noremap = true }) + +----- + +-- Debuger +a.nvim_set_keymap('n', 'db', ':DapToggleBreakpoint', { noremap = true }) -- Punto de espera +a.nvim_set_keymap('n', 'dc', ':DapContinue', { noremap = true }) -- Lanzar debugger +a.nvim_set_keymap('n', 'ds', ':DapTerminate', { noremap = true }) -- Detener debuger + +-- Lanzar y cierra interfaz debugger +a.nvim_set_keymap('n', 'du', ':lua require("dapui").toggle()', { noremap = true }) + +-- Neotree +a.nvim_set_keymap('n', 'p', ':NeoTreeFocusToggle', { noremap = true }) +a.nvim_set_keymap('n', 'g', ':NeoTreeFocusToggle git_status', { noremap = true }) diff --git a/lua/core/settings.lua b/lua/core/settings.lua new file mode 100644 index 0000000..33c41ac --- /dev/null +++ b/lua/core/settings.lua @@ -0,0 +1,38 @@ +local opt = vim.opt +local g = vim.g +local a = vim.api + +-- Establece el map leader +g.mapleader = " " + +-- Configuraciones generales +opt.encoding = "utf-8" +opt.mouse = "" +opt.clipboard = "unnamedplus" +opt.errorbells = false +opt.list = false +opt.cmdheight = 1 +opt.sw = 2 +opt.expandtab = true +opt.smartindent = true +opt.breakindent = true +opt.number = true +opt.rnu = true +opt.numberwidth = 2 +opt.swapfile = false +opt.backup = false +--vim.o.undodir = "~/.config/nvim/.undodir/" +opt.undofile = true +opt.incsearch = true +opt.ignorecase = true +opt.cursorline = true +opt.splitbelow = true +opt.splitright = true +opt.showmode = false + +--TODO: Cambiar las siguientes configuraciones a un nuevo archivo + +-- Configuración para archivos JSX grandes +a.nvim_command('autocmd BufEnter *.{js,jsx,ts,tsx} :syntax sync fromstart') +a.nvim_command('autocmd BufLeave *.{js,jsx,ts,tsx} :syntax sync clear') + diff --git a/lua/plugins/config/autopairs.lua b/lua/plugins/config/autopairs.lua new file mode 100644 index 0000000..f880500 --- /dev/null +++ b/lua/plugins/config/autopairs.lua @@ -0,0 +1,85 @@ +local mode = { "i", "c" } +local uifiletypes = { + "aerial", + "checkhealth", + "dap-repl", + "dapui_breakpoints", + "dapui_console", + "dapui_hover", + "dapui_scopes", + "dapui_stacks", + "dapui_watches", + "DressingInput", + "DressingSelect", + "neo-tree", + "lazy", + "lspinfo", + "mason", + "nerdterm", + "noice", + "null-ls-info", + "qf", + "spectre_panel", + "TelescopePrompt", +} + +return { + { + "altermo/npairs-integrate-upair", + keys = { + { "{", mode = mode }, + { "[", mode = mode }, + { "(", mode = mode }, + { '"', mode = mode }, + { "'", mode = mode }, + { "`", mode = mode }, + { "", mode = "i" }, + { "", mode = "i" }, + { "", mode = "i" }, + { "", mode = "i" }, + { "", mode = "i" }, + { "", mode = "i" }, + { "", mode = "i" }, + }, + dependencies = { + { "windwp/nvim-autopairs", dependencies = "nvim-treesitter/nvim-treesitter" }, + { "altermo/ultimate-autopair.nvim", dependencies = "nvim-treesitter/nvim-treesitter" }, + }, + init = function() + vim.api.nvim_create_autocmd("InsertEnter", { + callback = function() + local ok, cmp = pcall(require, "cmp") + + if ok then + if not package.loaded["npairs-int-upair"] then + require("lazy").load({ plugins = { "npairs-integrate-upair" } }) + end + + cmp.event:on("confirm_done", require("nvim-autopairs.completion.cmp").on_confirm_done()) + end + + return true + end, + once = true, + }) + end, + config = function() + local ignored_file_types = {} + local disable = { disable = true } + + for _, filetype in pairs(uifiletypes) do + ignored_file_types[filetype] = disable + end + + require("npairs-int-upair").setup({ + bs = "u", + npairs_conf = { + disable_filetype = uifiletypes, + check_ts = true, + fast_wrap = { highlight = "Question", highlight_grey = "Dimmed" }, + }, + upair_conf = { internal_pairs = { ft = ignored_file_types } }, + }) + end, + }, +} diff --git a/lua/plugins/config/black-indent.lua b/lua/plugins/config/black-indent.lua new file mode 100644 index 0000000..729867b --- /dev/null +++ b/lua/plugins/config/black-indent.lua @@ -0,0 +1,31 @@ +local open_file_event = { "BufNewFile", "BufRead", "BufAdd", "SessionLoadPost" } +return { + "lukas-reineke/indent-blankline.nvim", + depedencies = "nvim-treesitter/nvim-treesitter", + event = open_file_event, + config = function() + --vim.cmd [[highlight IndentBlanklineIndent guifg=#22262F ]] + vim.opt.list = true + --vim.opt.listchars:append "trail:●" + --vim.opt.listchars:append "space:·" + --vim.opt.listchars:append "eol:↓" + + require("indent_blankline").setup({ + use_treesitter = true, + show_current_context = true, + show_current_context_start = true, + show_trailing_blankline_indent = false, + show_end_of_line = true, + space_char_blankline = " ", + buftype_exclude = { + "help", + "loclist", + "nofile", + "prompt", + "quickfix", + "terminal", + }, + filetype_exclude = { "list" }, + }) + end +} diff --git a/lua/plugins/config/cmp.lua b/lua/plugins/config/cmp.lua new file mode 100644 index 0000000..14a9ff1 --- /dev/null +++ b/lua/plugins/config/cmp.lua @@ -0,0 +1,196 @@ +return { + { + "hrsh7th/nvim-cmp", + lazy = true, + dependencies = { + "nvim-treesitter/nvim-treesitter", + "onsails/lspkind.nvim" + }, + + config = function() + vim.o.completeopt = "menu,menuone,noselect" + + local has_words_before = function() + unpack = unpack or table.unpack + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil + end + + local cmp = require 'cmp' + local lspkind = require 'lspkind' + local luasnip = require 'luasnip' + local cmp_buffer = require 'cmp_buffer' + + local cmp_autopairs = require 'nvim-autopairs.completion.cmp' + + cmp.setup({ + performance = { debounce = 300, throttle = 40 }, + mapping = { + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + + [''] = cmp.mapping.confirm({ select = true}), + + --- Tab tigger seleccion + [''] = cmp.mapping(function(fallback) + if luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif cmp.visible() then + cmp.confirm({select = true}) + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end, { 'i', 'c' }), + + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { 'i', 'c' }), + }, + snippet = { + expand = function(args) + if package.loaded["luasnip"] then + require("luasnip").lsp_expand(args.body) + else + error("snippet engine is not configured.") + end + end, + }, + formatting = { + fields = { "abbr", "kind" }, + format = lspkind.cmp_format({ + mode = "symbol_text", + }), + }, + sources = { + { name = 'path', }, + { name = 'nvim_lsp', keyword_length = 1 }, + { + name = 'buffer', + keyword_length = 2, + option = { + get_bufnrs = function() + local bufs = {} + for _, win in ipairs(vim.api.nvim_list_wins()) do + local bufnr = vim.api.nvim_win_get_buf(win) + if vim.api.nvim_buf_get_option(bufnr, 'buftype') ~= 'terminal' then + bufs[bufnr] = true + end + end + return vim.tbl_keys(bufs) + end, + }, + }, + { name = 'luasnip', keyword_length = 1, priority = 1 }, + { name = 'cmp_tabnine', keyword_length = 1, }, + { name = 'emoji' }, + }, + window = { + documentation = cmp.config.window.bordered(), + }, + experimental = { ghost_text = false}, + }) + + -- Set configuration for specific filetype. + cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. + }, { + { name = 'buffer' }, + { max_item_count = 10 }, + }) + }) + + -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline('/', { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } + }) + + -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }) + }) + + --Autopairs + cmp.event:on( + 'confirm_done', + cmp_autopairs.on_confirm_done() + ) + -- Configuración de altura de ventanas flotantes + vim.opt.pumheight = 10 + vim.opt.cmdwinheight = 10 + + vim.cmd [[highlight! default link CmpItemKind CmpItemMenuDefault]] + end, + }, + { "hrsh7th/cmp-buffer", event = "InsertEnter", dependencies = "hrsh7th/nvim-cmp" }, + { "hrsh7th/cmp-path", event = "InsertEnter", dependencies = "hrsh7th/nvim-cmp" }, + { "hrsh7th/cmp-emoji", event = "InsertEnter", dependencies = "hrsh7th/nvim-cmp" }, + + { + "hrsh7th/cmp-cmdline", + event = "CmdlineEnter", + dependencies = { "hrsh7th/nvim-cmp", "hrsh7th/cmp-buffer", "hrsh7th/cmp-path" }, + config = function() + require("cmp").setup.cmdline({ "/", "?" }, { + mapping = require("cmp").mapping.preset.cmdline(), + sources = require("cmp").config.sources({ + { name = "buffer", option = { indexing_interval = 284 }, keyword_length = 1, priority = 1 }, + }), + }) + + require("cmp").setup.cmdline(":", { + mapping = require("cmp").mapping.preset.cmdline(), + sources = require("cmp").config.sources({ + { name = "path", keyword_length = 1, priority = 2 }, + }, { + { name = "cmdline", keyword_length = 1, priority = 1 }, + }), + }) + end, + }, + { + "hrsh7th/cmp-nvim-lsp", + event = "LspAttach", + dependencies = { "hrsh7th/nvim-cmp", "L3MON4D3/LuaSnip" } + }, + { + "saadparwaiz1/cmp_luasnip", + event = "InsertEnter", + dependencies = { "hrsh7th/nvim-cmp", "L3MON4D3/LuaSnip" } + }, + { + "jackieaskins/cmp-emmet", + build = "npm run release", + event = "InsertEnter", + dependencies = "hrsh7th/nvim-cmp" + }, + { + "rcarriga/cmp-dap", + ft = { "dap-repl", "dapui_watches", "dapui_hover" }, + dependencies = "hrsh7th/nvim-cmp", + config = function() + require("cmp").setup.filetype( + { "dap-repl", "dapui_watches", "dapui_hover" }, + { sources = require("cmp").config.sources({ { name = "dap", keyword_lenght = 1 } }) } + ) + end, + }, +} diff --git a/lua/plugins/config/colorizer.lua b/lua/plugins/config/colorizer.lua new file mode 100644 index 0000000..2d5bd1b --- /dev/null +++ b/lua/plugins/config/colorizer.lua @@ -0,0 +1,16 @@ +--Plugin para colorear Hexadecimales + +return { + "norcalli/nvim-colorizer.lua", + + --El plugun solo carga con estos archivos + ft = { "html", "css", "js", "jsx", "ts", "tsx" }, + + config = function() + require 'colorizer'.setup({ + 'css', + 'javascript', + html = { mode = 'background' }, + }, { mode = 'foreground' }) + end +} diff --git a/lua/plugins/config/comment.lua b/lua/plugins/config/comment.lua new file mode 100644 index 0000000..ccabbd4 --- /dev/null +++ b/lua/plugins/config/comment.lua @@ -0,0 +1,5 @@ +-- Hay que crear los keys para inicio del plugin +return { + "scrooloose/nerdcommenter", + --lazy = true +} diff --git a/lua/plugins/config/dap.lua b/lua/plugins/config/dap.lua new file mode 100644 index 0000000..f54fee7 --- /dev/null +++ b/lua/plugins/config/dap.lua @@ -0,0 +1,194 @@ +return { + "mfussenegger/nvim-dap", + keys = { + { + "", + function() + require("dap").toggle_breakpoint() + end, + }, + { + "", + function() + require("dap").continue() + end, + }, + }, + dependencies = { + { + "rcarriga/nvim-dap-ui", + config = function() + require("dapui").setup({ + layouts = { + { + elements = { "scopes", "watches", "stacks", "breakpoints" }, + size = require("wuelnerdotexe.plugin.util").get_sidebar_width(), + position = "left", + }, + { elements = { "console", "repl" }, size = 0.25, position = "bottom" }, + }, + }) + end, + }, + { + "jay-babu/mason-nvim-dap.nvim", + dependencies = "williamboman/mason.nvim", + config = function() + require("mason-nvim-dap").setup({ ensure_installed = { "firefox", "node2" } }) + end, + }, + }, + config = function() + require("dap").adapters.node2 = { + type = "executable", + command = "node", + args = { + require("mason-registry").get_package("node-debug2-adapter"):get_install_path() + .. "/out/src/nodeDebug.js", + }, + } + + require("dap").adapters.firefox = { + type = "executable", + command = "node", + args = { + require("mason-registry").get_package("firefox-debug-adapter"):get_install_path() + .. "/dist/adapter.bundle.js", + }, + } + + for _, language in pairs({ "javascript", "typescript" }) do + require("dap").configurations[language] = { + { + name = "Launch Node against current file", + type = "node2", + request = "launch", + program = "${file}", + cwd = vim.loop.cwd(), + sourceMaps = true, + protocol = "inspector", + console = "integratedTerminal", + }, + { + name = "Launch Node against pick process", + type = "node2", + request = "attach", + processId = require("dap.utils").pick_process, + console = "integratedTerminal", + }, + { + name = "Launch Firefox against localhost", + request = "launch", + type = "firefox", + reAttach = true, + url = "http://localhost:3000", + webRoot = "${workspaceFolder}", + console = "integratedTerminal", + }, + } + end + + for _, language in pairs({ "javascriptreact", "typescriptreact" }) do + require("dap").configurations[language] = { + { + name = "Launch Firefox against localhost", + request = "launch", + type = "firefox", + reAttach = true, + url = "http://localhost:3000", + webRoot = "${workspaceFolder}", + console = "integratedTerminal", + }, + } + end + + vim.api.nvim_call_function( + "sign_define", + { "DapBreakpoint", { linehl = "", text = "", texthl = "GitSignsDelete", numhl = "" } } + ) + + vim.api.nvim_call_function( + "sign_define", + { "DapBreakpointCondition", { linehl = "", text = "", texthl = "GitSignsDelete", numhl = "" } } + ) + + vim.api.nvim_call_function( + "sign_define", + { "DapLogPoint", { linehl = "", text = "", texthl = "GitSignsDelete", numhl = "" } } + ) + + vim.api.nvim_call_function( + "sign_define", + { "DapStopped", { linehl = "GitSignsChangeLn", text = "", texthl = "GitSignsChange", numhl = "" } } + ) + + vim.api.nvim_call_function( + "sign_define", + { "DapBreakpointRejected", { linehl = "", text = "", texthl = "", numhl = "" } } + ) + + require("dap").listeners.after.event_initialized.dapui_config = function() + require("dapui").open() + + vim.api.nvim_set_keymap("n", "", "", { + callback = function() + require("dap").pause() + end, + }) + vim.api.nvim_set_keymap("n", "", "", { + callback = function() + require("dap").step_over() + end, + }) + vim.api.nvim_set_keymap("n", "", "", { + callback = function() + require("dap").step_into() + end, + }) + vim.api.nvim_set_keymap("n", "", "", { + callback = function() + require("dap").terminate() + end, + }) + vim.api.nvim_set_keymap("n", "", "", { + callback = function() + require("dap").run_last() + end, + }) + vim.api.nvim_set_keymap("n", "", "", { + callback = function() + require("dap").step_out() + end, + }) + vim.api.nvim_set_keymap("n", "", "", { + callback = function() + require("dap").step_into({ ask_for_targets = true }) + end, + }) + end + + require("dap").listeners.before.event_exited.dapui_config = function() + require("dapui").close() + + vim.api.nvim_del_keymap("n", "") + vim.api.nvim_del_keymap("n", "") + vim.api.nvim_del_keymap("n", "") + vim.api.nvim_del_keymap("n", "") -- S-F5 + vim.api.nvim_del_keymap("n", "") -- S-C-F5 + vim.api.nvim_del_keymap("n", "") -- S-F11 + vim.api.nvim_del_keymap("n", "") -- C-F11 + end + + require("dap").listeners.before.event_terminated.dapui_config = function() + require("dapui").close() + + vim.api.nvim_del_keymap("n", "") + vim.api.nvim_del_keymap("n", "") + vim.api.nvim_del_keymap("n", "") + vim.api.nvim_del_keymap("n", "") -- S-F5 + vim.api.nvim_del_keymap("n", "") -- S-C-F5 + vim.api.nvim_del_keymap("n", "") -- S-F11 + vim.api.nvim_del_keymap("n", "") -- C-F11 + end + end, +} diff --git a/lua/plugins/config/easy-motion.lua b/lua/plugins/config/easy-motion.lua new file mode 100644 index 0000000..31069c5 --- /dev/null +++ b/lua/plugins/config/easy-motion.lua @@ -0,0 +1,10 @@ +return { + "easymotion/vim-easymotion", + lazy = true, + keys = { + { "f", "(easymotion-s2)", desc = "easymotion" } + }, + config = function() + vim.g.EasyMotion_smartcase = 1 + end +} diff --git a/lua/plugins/config/gitsigns.lua b/lua/plugins/config/gitsigns.lua new file mode 100644 index 0000000..a60993d --- /dev/null +++ b/lua/plugins/config/gitsigns.lua @@ -0,0 +1,17 @@ +return { + "lewis6991/gitsigns.nvim", + --lazy = true, + depedencies = "nvim-lua/plenary.nvim", + config = function() + require('gitsigns').setup({ + preview_config = { + -- Options passed to nvim_open_win + border = 'single', + style = 'minimal', + relative = 'cursor', + row = 0, + col = 1 + }, + }) + end +} diff --git a/lua/plugins/config/init.lua b/lua/plugins/config/init.lua new file mode 100644 index 0000000..f92b06a --- /dev/null +++ b/lua/plugins/config/init.lua @@ -0,0 +1,9 @@ +--plugins/config/init => Carga los plugins que no necesitan configuración + +return { + "lilydjwg/colorizer", + "tpope/vim-fugitive", + "tpope/vim-surround", + "matze/vim-move", + "mg979/vim-visual-multi", --Requiere configuracion +} diff --git a/plug-settings/lsp.vim b/lua/plugins/config/lsp/config_lsp.lua similarity index 58% rename from plug-settings/lsp.vim rename to lua/plugins/config/lsp/config_lsp.lua index 3ed88c5..f45f806 100644 --- a/plug-settings/lsp.vim +++ b/lua/plugins/config/lsp/config_lsp.lua @@ -1,4 +1,5 @@ -lua << EOF +--NOTA: Este archivo debe ir en otra parte + --LSP Instaler local nvim_lsp = require('lspconfig') @@ -11,7 +12,7 @@ capabilities.textDocument.completion.completionItem.snippetSupport = true -- Mappings. -- See `:help vim.diagnostic.*` for documentation on any of the below functions -local opts = { noremap=true, silent=true } +local opts = { noremap = true, silent = true } vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) @@ -23,14 +24,13 @@ local on_attach = function(client, bufnr) vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') -- Mappings. - -- See `:help vim.lsp.*` for documentation on any of the below functions - local bufopts = { noremap=true, silent=true, buffer=bufnr } - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) - vim.keymap.set('n', 'el', vim.diagnostic.setloclist, bufopts) - vim.keymap.set('n', 'er', vim.diagnostic.open_float, bufopts) - end + local bufopts = { noremap = true, silent = true, buffer = bufnr } + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) + vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) + vim.keymap.set('n', 'el', vim.diagnostic.setloclist, bufopts) + vim.keymap.set('n', 'er', vim.diagnostic.open_float, bufopts) +end local lsp_flags = { -- This is the default in Nvim 0.7+ @@ -39,15 +39,16 @@ local lsp_flags = { --Config Servers ---Typescript, Javascript, JSX, TSX -require('lspconfig')['tsserver'].setup{ - capabilities = capabilities, - on_attach = on_attach, - flags = lsp_flags, +--Typescript, Javascript, JSX, TSX + +nvim_lsp.tsserver.setup { + capabilities = capabilities, + on_attach = on_attach, + flags = lsp_flags, } --Go Server - require'lspconfig'.gopls.setup{ +nvim_lsp.gopls.setup { on_attach = on_attach, capabilities = capabilities, flags = lsp_flags, @@ -56,7 +57,7 @@ require('lspconfig')['tsserver'].setup{ } --Astro server -require('lspconfig')['astro'].setup { +nvim_lsp['astro'].setup { capabilities = capabilities, on_attach = on_attach, flags = lsp_flags, @@ -68,27 +69,27 @@ require('lspconfig')['cssmodules_ls'].setup { flags = lsp_flags, filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact" - } + } } require('lspconfig')['cssls'].setup { on_attach = on_attach, flags = lsp_flags, filetypes = { - "css", "scss", "less" + "css", "scss", "less" }, settings = { css = { - validate = true - }, + validate = true + }, less = { validate = true }, scss = { - validate = true + validate = true } }, - single_file_support = true, + single_file_support = true, } -- Html Server @@ -99,65 +100,65 @@ require('lspconfig')['html'].setup { css = true, javascript = true }, + providerFormatter = true, single_file_support = true, } --Vim Server -require('lspconfig')['vimls'].setup{} +require('lspconfig')['vimls'].setup {} -require('lspconfig')['lua_ls'].setup{} +require('lspconfig')['lua_ls'].setup { + on_attach = on_attach, + flags = lsp_flags, + format = {enable = true} +} --ESLINT Server Config require("lspconfig").eslint.setup({ - on_attach = on_attach, - flags = lsp_flags, - settings = { format = false }, + on_attach = on_attach, + flags = lsp_flags, + settings = { format = false }, }) --- StyleLint Config -require('lspconfig')['stylelint_lsp'].setup{ - - filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'css', 'scss', 'less','astro'}, +require('lspconfig')['stylelint_lsp'].setup { + filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'css', 'scss', 'less', 'astro' }, capabilities = capabilities, handlers = handlers, - on_attach = on_attach, + on_attach = on_attach, settings = { - autoFixOnSave = true, - autoFixOnFormat = true, - validateOnType = true - -- other settings... - } + autoFixOnSave = true, + autoFixOnFormat = true, + validateOnType = true + -- other settings... + } } --JSON Lenguaje -require('lspconfig')['jsonls'].setup{ +require('lspconfig')['jsonls'].setup { on_attach = on_attach, flags = lsp_flags, } --- Tailwind +-- Tailwind -- require("lspconfig").tailwindcss.setup({ - -- on_attach = on_attach, - -- flags = lsp_flags, - -- capabilities = capabilities, - --}) - ---LSP Colors -require("lsp-colors").setup({ - Error = "#db4b4b", - Warning = "#e0af68", - Information = "#0db9d7", - Hint = "#10B981" -}) +-- on_attach = on_attach, +-- flags = lsp_flags, +-- capabilities = capabilities, +--}) + -- Errors hover LSP vim.diagnostic.config({ - underline = true, + --underline = true, virtual_text = false, - update_in_insert = false + update_in_insert = false, + severity_sort = false, + float = { + border = 'rounded', + source = 'always', + } }) -- Show line diagnostics automatically in hover window vim.o.updatetime = 250 - -EOF diff --git a/lua/plugins/config/lsp/init.lua b/lua/plugins/config/lsp/init.lua new file mode 100644 index 0000000..7113952 --- /dev/null +++ b/lua/plugins/config/lsp/init.lua @@ -0,0 +1,13 @@ +return { + "neovim/nvim-lspconfig", + dependencies = { + { + "williamboman/mason-lspconfig.nvim", + dependencies = "williamboman/mason.nvim", + }, + "hrsh7th/cmp-nvim-lsp", + }, + config = function() + require("plugins.config.lsp.config_lsp") + end +} diff --git a/lua/plugins/config/luaSnips.lua b/lua/plugins/config/luaSnips.lua new file mode 100644 index 0000000..4f3ca90 --- /dev/null +++ b/lua/plugins/config/luaSnips.lua @@ -0,0 +1,29 @@ +return { + "L3MON4D3/LuaSnip", + build = "make install_jsregexp", + keys = { + { + "", + function() return require("luasnip").expand_or_jumpable() and "luasnip-expand-or-jump" or "" end, + expr = true, + mode = "i", + }, + { "", function() require("luasnip").jump(1) end, mode = "s" }, + { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, + }, + dependencies = { + { + "rafamadriz/friendly-snippets", + config = function() require("luasnip.loaders.from_vscode").lazy_load() end, + }, + "saadparwaiz1/cmp_luasnip" + }, + config = function() + require("luasnip").setup({ + history = true, + region_check_events = { "CursorMoved", "CursorMovedI" }, + delete_check_events = { "TextChanged", "TextChangedI" }, + }) + + end, +} diff --git a/lua/plugins/config/lualine.lua b/lua/plugins/config/lualine.lua new file mode 100644 index 0000000..7db8aaf --- /dev/null +++ b/lua/plugins/config/lualine.lua @@ -0,0 +1,42 @@ +return { + "nvim-lualine/lualine.nvim", + dependencies = { "kyazdani42/nvim-web-devicons" }, + config = function() + require('lualine').setup { + options = { + { icons_enabled = true }, + { theme = "auto" }, + section_separators = '', + component_separators = '', + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = { + { 'mode' }, + }, + lualine_b = { + { + 'filename', + path = 1, + symbols = { + modified = '[+]', + readonly = '[-]', + unnamed = '[No Name]', + newfile = '[New]', + }, + }, + }, + lualine_c = { + { 'diff' }, { 'diagnostics' } + }, + lualine_x = { 'branch' }, + lualine_y = { 'location' }, + lualine_z = { 'progress' }, + }, + } + end +} diff --git a/lua/plugins/config/markdown-preview.lua b/lua/plugins/config/markdown-preview.lua new file mode 100644 index 0000000..314c814 --- /dev/null +++ b/lua/plugins/config/markdown-preview.lua @@ -0,0 +1,12 @@ +return { + "iamcco/markdown-preview.nvim", + build = "cd app && npm install", + ft = "markdown", + init = function() + vim.api.nvim_set_var("mkdp_auto_close", 0) + vim.api.nvim_set_var("mkdp_refresh_slow", 1) + vim.api.nvim_set_var("mkdp_browser", "edge") + vim.api.nvim_set_var("mkdp_echo_preview_url", 1) + vim.api.nvim_set_var("mkdp_theme", "dark") + end, +} diff --git a/lua/plugins/config/mason.lua b/lua/plugins/config/mason.lua new file mode 100644 index 0000000..352024c --- /dev/null +++ b/lua/plugins/config/mason.lua @@ -0,0 +1,17 @@ +return { + "williamboman/mason.nvim", + lazy = true, + config = function() + require("mason").setup() + require("mason-lspconfig").setup({ + automatic_installation = true, + ensure_installed = { + "cssls", + "eslint", + "html", + "jsonls", + "tsserver", + }, + }) + end, +} diff --git a/lua/plugins/config/neo-tree.lua b/lua/plugins/config/neo-tree.lua new file mode 100644 index 0000000..824034b --- /dev/null +++ b/lua/plugins/config/neo-tree.lua @@ -0,0 +1,115 @@ +return { + "nvim-neo-tree/neo-tree.nvim", + dependencies = { "nvim-lua/plenary.nvim", "kyazdani42/nvim-web-devicons", "MunifTanjim/nui.nvim" }, + --deactivate = function() vim.api.nvim_command("Neotree close") end, + config = function() + require("neo-tree").setup({ + enable_diagnostics = true, + hide_root_node = true, + resize_timer_interval = 42, + use_default_mappings = false, + source_selector = { + winbar = true, + source = { { source = "filesystem", display_name = " 󰉓 Folders "},{ source = "git_status", display_name = "  Git "} }, + content_layout = "center", + separator = "", + separator_active = { left = "▎", right = "" }, + show_separator_on_edge = true, + }, + default_component_configs = { + container = { right_padding = 1 }, + icon = { + folder_closed = "", + folder_open = "", + folder_empty = "", + folder_empty_open = "", + default = "", + }, + modified = { symbol = "●" }, + git_status = { + symbols = { + added = "A", + deleted = "D", + modified = "M", + renamed = "R", + untracked = "U", + ignored = "!", + conflict = "C", + }, + }, + diagnostics = { + symbols = { + hint = "", + info = "", + warn = "", + error = "", + }, + }, + }, + window = { + position = "float", + popup = { + size = { height = "20", width = "50" }, + position = "50%" + }, + --width = 30, + --height = 50, + mapping_options = { + noremap = true, + nowait = true, + }, + mappings = { + [""] = "open", + ["<2-LeftMouse>"] = "open", + [""] = "open_split", + [""] = "open_vsplit", + [""] = "open_tabnew", + [""] = "refresh", + ["a"] = { "add", config = show_path }, + ["d"] = "delete", + ["r"] = "rename", + ["y"] = "copy_to_clipboard", + ["x"] = "cut_to_clipboard", + ["p"] = "paste_from_clipboard", + ["c"] = { "copy", config = show_path }, + ["m"] = { "move", config = show_path }, + ["q"] = "close_window", + ["?"] = "show_help", + ["g?"] = "show_help", + ["gb"] = "next_source", + [""] = "next_source", + ["gB"] = "prev_source", + [""] = "prev_source", + } + }, + filesystem = { + filtered_items = { + hide_dotfiles = false, + hide_gitignored = false, + } + }, + -- Cerra el archivo al abrirlo + event_handlers = { + { + event = "file_opened", + handler = function(file_path) + --auto close + require("neo-tree").close_all() + end + }, + }, + git_status = { + window = { + mappings = { + ["A"] = "git_add_all", + ["u"] = "git_unstage_file", + ["a"] = "git_add_file", + ["r"] = "git_revert_file", + ["c"] = "git_commit", + ["p"] = "git_push", + }, + }, + }, + }) + end +} diff --git a/lua/plugins/config/nerdterm.lua b/lua/plugins/config/nerdterm.lua new file mode 100644 index 0000000..e9baa52 --- /dev/null +++ b/lua/plugins/config/nerdterm.lua @@ -0,0 +1,6 @@ +return { + "wuelnerdotexe/nerdterm", + keys = { + { "", "(NERDTermToggle)", desc = "NerdTerm" }, + }, +} diff --git a/lua/plugins/config/null-ls.lua b/lua/plugins/config/null-ls.lua new file mode 100644 index 0000000..3b2e0b2 --- /dev/null +++ b/lua/plugins/config/null-ls.lua @@ -0,0 +1,51 @@ +-- Este plugin permite el auto save con Prettier y Eslint +-- FIX: Comprobar cuando cargar el plugin si al iniciar o con un key +return { + "jose-elias-alvarez/null-ls.nvim", + config = function() + local null_ls = require("null-ls") + + local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) + + null_ls.setup({ + update_in_insert = vim.diagnostic.config().update_in_insert, + debounce = 300, + on_attach = function(client, bufnr) + if client.supports_method("textDocument/formatting") then + vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) + vim.api.nvim_create_autocmd("BufWritePre", { + group = augroup, + buffer = bufnr, + callback = function() + vim.lsp.buf.format({ bufnr = bufnr }) + require("luasnip").session.current_nodes[bufnr] = nil + end, + }) + end + end, + sources = { + null_ls.builtins.diagnostics.jsonlint, + null_ls.builtins.diagnostics.selene, + null_ls.builtins.formatting.gofumpt, + null_ls.builtins.formatting.goimports, + --require("null-ls").builtins.diagnostics.markdownlint, + null_ls.builtins.formatting.prettierd.with({ + condition = function(utils) + return utils.root_has_file({ + ".prettierrc", + ".prettierrc.json", + ".prettierrc.yaml", + ".prettierrc.yml", + ".prettierrc.json5", + ".prettierrc.js", + ".prettierrc.cjs", + "prettier.config.js", + "prettier.config.cjs", + ".prettierrc.toml", + }) + end, + }), + }, + }) + end, +} diff --git a/lua/plugins/config/tab-nine.lua b/lua/plugins/config/tab-nine.lua new file mode 100644 index 0000000..a550c39 --- /dev/null +++ b/lua/plugins/config/tab-nine.lua @@ -0,0 +1,38 @@ +--Plugin de CMP para tabnine +return { + { + "tzachar/cmp-tabnine", + lazy = true, + dependencies = "hrsh7th/nvim-cmp", + build = "./install.sh", + init = function() + vim.api.nvim_create_autocmd("BufRead", { + callback = function() require("cmp_tabnine"):prefetch(vim.api.nvim_call_function("expand", { "%:p" })) end, + }) + end, + config = function() + require("cmp_tabnine.config").setup({ + ignored_file_types = { + ["aerial"] = true, + ["checkhealth"] = true, + ["dap-repl"] = true, + ["dapui_breakpoints"] = true, + ["dapui_console"] = true, + ["dapui_hover"] = true, + ["dapui_scopes"] = true, + ["dapui_stacks"] = true, + ["dapui_watches"] = true, + ["lspinfo"] = true, + ["mason"] = true, + ["nerdterm"] = true, + ["noice"] = true, + ["notify"] = true, + ["null-ls-info"] = true, + ["packer"] = true, + ["qf"] = true, + ["TelescopePrompt"] = true, + }, + }) + end + }, +} diff --git a/lua/plugins/config/telescope.lua b/lua/plugins/config/telescope.lua new file mode 100644 index 0000000..54da366 --- /dev/null +++ b/lua/plugins/config/telescope.lua @@ -0,0 +1,48 @@ +return { + "nvim-telescope/telescope.nvim", + dependencies = { + { "nvim-lua/plenary.nvim" }, + { "kyazdani42/nvim-web-devicons" }, + }, + keys = { + { "f", function() require("telescope.builtin").find_files() end }, + { "a", function() require("telescope.builtin").live_grep() end }, + { "mf", function() require("telescope.builtin").marks() end }, + { "ls", function() require("telescope.builtin").git_commits() end }, + { "ag", function() require("telescope.builtin").git_files() end }, + { "of", function() require("telescope.builtin").oldfiles() end }, + { "b", function() require("telescope.builtin").buffers() end }, + }, + config = function() + require('telescope').setup { + initial_mode = "insert", + defaults = { + layout_config = { + vertical = { width = 0.5 } + }, + file_ignore_patterns = { "node_modules", ".git" } + }, + pickers = { + find_files = { + theme = "dropdown", + hidden = true + }, + oldfiles = { + theme = "ivy" + }, + live_grep = { + }, + git_commits = { + theme = "ivy" + }, + buffers = { + ignore_current_buffer = true, + sort_mru = true, + theme = "dropdown" + } + }, + extensions = { + } + } + end +} diff --git a/lua/plugins/config/tmux.lua b/lua/plugins/config/tmux.lua new file mode 100644 index 0000000..332042d --- /dev/null +++ b/lua/plugins/config/tmux.lua @@ -0,0 +1,28 @@ +return { + "aserowy/tmux.nvim", + keys = { "", "", "", "", "", "", "", "" }, + config = function() + require("tmux").setup({ + copy_sync = { + enable = true, + ignore_buffers = { empty = false }, + redirect_to_clipboard = false, + register_offset = 0, + sync_clipboard = true, + sync_registers = true, + sync_deletes = true, + sync_unnamed = true, + }, + navigation = { + cycle_navigation = true, + enable_default_keybindings = true, + persist_zoom = false, + }, + resize = { + enable_default_keybindings = true, + resize_step_x = 1, + resize_step_y = 1, + }, + }) + end, +} diff --git a/lua/plugins/config/todo-comments.lua b/lua/plugins/config/todo-comments.lua new file mode 100644 index 0000000..bfa99ec --- /dev/null +++ b/lua/plugins/config/todo-comments.lua @@ -0,0 +1,43 @@ +return { + 'folke/todo-comments.nvim', + dependencies = { + "nvim-telescope/telescope.nvim", + "nvim-lua/plenary.nvim", + { + "folke/trouble.nvim", + dependencies = "kyazdani42/nvim-web-devicons", + } + }, + keys = { + {'td', ':TodoTelescope'} + }, + config = function () + require("todo-comments").setup { + signs = true, -- show icons in the signs column + keywords = { + FIX = { + icon = " ", + color = "error", + alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, + signs = false, + }, + TODO = { icon = " ", color = "info" }, + HACK = { icon = " ", color = "warning" }, + WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, + PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, + NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, + TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" }}, + }, + colors = { + error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, + warning = { "DiagnosticWarning", "WarningMsg", "#FBBF24" }, + info = { "DiagnosticInfo", "#2563EB" }, + hint = { "DiagnosticHint", "#10B981" }, + default = { "Identifier", "#7C3AED" }, + test = { "Identifier", "#FF00FF" } + }, + } + end +} + + diff --git a/lua/plugins/config/treesitter.lua b/lua/plugins/config/treesitter.lua new file mode 100644 index 0000000..191248a --- /dev/null +++ b/lua/plugins/config/treesitter.lua @@ -0,0 +1,60 @@ +local open_file_event = { "BufNewFile", "BufRead", "BufAdd", "SessionLoadPost" } +return { + { + 'nvim-treesitter/nvim-treesitter', + build = ":TSUpdate", + lazy = false, + config = function() + require 'nvim-treesitter.configs'.setup { + -- A list of parser names, or "all" + ensure_installed = { "lua", "astro", "html", }, + sync_install = true, + + ignore_install = { "" }, + + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + autotag = { + enable = true, + filetypes = { + 'html', 'markdown', 'astro', + 'javascript', 'javascriptreact', 'tsx', + 'typescript', 'typescriptreact', 'jsx', + } + }, + rainbow = { + enable = true, + --colors = { + --"#90b99f", + --"#e6b99d", + --"#ea83a5", + --"#aca1cf", + --"#f5a191", + --"#c1c0d4", + --"#f591b2" + --}, + --extended_mode = true, + --max_file_line = nil + } + } + end + }, + { + "HiPhish/nvim-ts-rainbow2", + event = open_file_event, + dependencies = "nvim-treesitter/nvim-treesitter", + }, + { + "windwp/nvim-ts-autotag", + event = "InsertEnter", + dependencies = "nvim-treesitter/nvim-treesitter", + }, + { + "danymat/neogen", + cmd = "Neogen", + dependencies = { "nvim-treesitter/nvim-treesitter", "L3MON4D3/LuaSnip" }, + config = function() require("neogen").setup({ snippet_engine = "luasnip" }) end, + }, + } diff --git a/lua/plugins/config/visual-multi.lua b/lua/plugins/config/visual-multi.lua new file mode 100644 index 0000000..4c99a58 --- /dev/null +++ b/lua/plugins/config/visual-multi.lua @@ -0,0 +1,6 @@ +return { + "mg979/vim-visual-multi", + keys = { + { "", mode = { "n", "x" } }, + }, +} diff --git a/lua/plugins/config/web-devicons.lua b/lua/plugins/config/web-devicons.lua new file mode 100644 index 0000000..5a55886 --- /dev/null +++ b/lua/plugins/config/web-devicons.lua @@ -0,0 +1,15 @@ +return { + "kyazdani42/nvim-web-devicons", + config = function() + if vim.g.loaded_devicons == nil then + return + end + + require 'nvim-web-devicons'.setup { + override = { + }, + default = true, + color_icons = true + } + end +} diff --git a/lua/plugins/lazy.lua b/lua/plugins/lazy.lua new file mode 100644 index 0000000..65e47e1 --- /dev/null +++ b/lua/plugins/lazy.lua @@ -0,0 +1,42 @@ +--plugins/lazy => configuraciones iniciales de lazy +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup({ + spec = { + { + import = "plugins.config", + }, + { + import = "themes", + }, + }, + default = { lazy = true, version = false }, + ui = { + border = "rounded", + }, + performance = { + rtp = { + disabled_plugins = { + "gzip", + "matchit", + "matchparen", + "netrwPlugin", + "tarPlugin", + "tohtml", + "tutor", + "zipPlugin", + }, + }, + }, +}) diff --git a/plug-settings/bufferline.lua b/lua/plugins/misc/bufferline.lua similarity index 100% rename from plug-settings/bufferline.lua rename to lua/plugins/misc/bufferline.lua diff --git a/plug-settings/go.lua b/lua/plugins/misc/go.lua similarity index 100% rename from plug-settings/go.lua rename to lua/plugins/misc/go.lua diff --git a/lua/themes/ayu.lua b/lua/themes/ayu.lua new file mode 100644 index 0000000..3ba4fdb --- /dev/null +++ b/lua/themes/ayu.lua @@ -0,0 +1,18 @@ +return { + "Shatur/neovim-ayu", + lazy = false, + enabled = false, + priority = 1000, + config = function() + require("ayu").setup({ + overrides = function() + if vim.o.background == "dark" then + return { NormalNC = { bg = "#060C11", fg = "#808080" } } + else + return { NormalNC = { bg = "#f0f0f0", fg = "#808080" } } + end + end, + }) + require("ayu").colorscheme() + end, +} diff --git a/lua/themes/catppuccin.lua b/lua/themes/catppuccin.lua new file mode 100644 index 0000000..f42abe6 --- /dev/null +++ b/lua/themes/catppuccin.lua @@ -0,0 +1,41 @@ +return { + "catppuccin/nvim", + lazy = false, + enabled = false, + priority = 1000, + config = function() + vim.g.catppuccin_flavour = "frappe" -- latte, frappe, macchiato, mocha + + require("catppuccin").setup({ + flavour = "macchiato", + transparent_background = false, + highlight_overrides = {}, + styles = { + comments = {}, + conditionals = {}, + loops = {}, + functions = { "italic" }, + keywords = {}, + strings = {}, + variables = {}, + numbers = {}, + booleans = {}, + properties = {}, + types = { "bold" }, + operators = {}, + }, + integrations = { + cmp = true, + gitsigns = true, + nvimtree = true, + --telescope = true, + treesitter = true, + indent_blankline = { + enabled = true, + colored_indent_levels = true, + }, + }, + }) + vim.cmd([[colorscheme catppuccin]]) + end, +} diff --git a/lua/themes/enfocado.lua b/lua/themes/enfocado.lua new file mode 100644 index 0000000..3e745ed --- /dev/null +++ b/lua/themes/enfocado.lua @@ -0,0 +1,37 @@ +return { + "wuelnerdotexe/vim-enfocado", + lazy = true, + enabled = false, + priority = 1000, + init = function() + vim.api.nvim_set_var("enfocado_plugins", { + "aerial", + "bufferline", + "cmp", + "dap-ui", + "gitsigns", + "illuminate", + "indent-blankline", + "lazy", + "lspconfig", + "matchup", + "neo-tree", + "noice", + "null-ls", + "smoothcursor", + "substitute", + "surround", + "telescope", + "treesitter", + "ts-rainbow2", + "visual-multi", + "yanky", + }) + + vim.api.nvim_create_autocmd("ColorScheme", { + pattern = "enfocado", + callback = function() vim.api.nvim_command("highlight NormalNC guibg=#1e1e1e") end, + }) + end, + config = function() vim.api.nvim_command("colorscheme enfocado") end, +} diff --git a/lua/themes/everblush.lua b/lua/themes/everblush.lua new file mode 100644 index 0000000..fd976d4 --- /dev/null +++ b/lua/themes/everblush.lua @@ -0,0 +1,18 @@ +return { + 'Everblush/nvim', + name = "everblush", + lazy = false, + enabled = false, + priority = 1000, + config = function() + require('everblush').setup({ + -- Default options + override = {}, + transparent_background = false, + nvim_tree = { + contrast = false, + }, + }) + vim.cmd('colorscheme everblush') + end +} diff --git a/lua/themes/gruvboxMaterial.lua b/lua/themes/gruvboxMaterial.lua new file mode 100644 index 0000000..3a77302 --- /dev/null +++ b/lua/themes/gruvboxMaterial.lua @@ -0,0 +1,14 @@ +return { + "sainnhe/gruvbox-material", + lazy = false, + enabled = false, + priority = 1000, + config = function() + vim.g.gruvbox_material_background = 'hard' + vim.g.gruvbox_material_enable_bold = true + vim.g.gruvbox_material_enable_italic = true + vim.g.gruvbox_material_transparent_background = true + + vim.cmd('colorscheme gruvbox-material') + end +} diff --git a/lua/themes/mellow.lua b/lua/themes/mellow.lua new file mode 100644 index 0000000..b1f2373 --- /dev/null +++ b/lua/themes/mellow.lua @@ -0,0 +1,16 @@ +return { + "kvrohit/mellow.nvim", + lazy = false, + enabled = false, + priority = 1000, + config = function() + --vim.g.mellow_italic_functions = true + --vim.g.mellow_bold_functions = true + --vim.g.mellow_bold_variables = true + vim.g.mellow_italic_keywords = true + vim.g.mellow_bold_keywords = true + vim.g.mellow_transparent = true + + vim.cmd [[colorscheme mellow]] + end +} diff --git a/lua/themes/nightfox.lua b/lua/themes/nightfox.lua new file mode 100644 index 0000000..6097d38 --- /dev/null +++ b/lua/themes/nightfox.lua @@ -0,0 +1,45 @@ +return { + "EdenEast/nightfox.nvim", + lazy = false, + enabled = true, + priority = 1000, + config = function() + require('nightfox').setup({ + options = { + compile_path = vim.fn.stdpath("cache") .. "/nightfox", + compile_file_suffix = "_compiled", + --transparent = true, -- Disable setting background + terminal_colors = true, + dim_inactive = false, -- Non focused panes set to alternative background + module_default = true, -- Default enable value for modules + styles = { + comments = "italic", + conditionals = "NONE", + constants = "NONE", + functions = "bold", + keywords = "NONE", + numbers = "NONE", + operators = "bold", + strings = "NONE", + types = "italic", + variables = "NONE", + }, + inverse = { + -- Inverse highlight for different types + match_paren = false, + visual = false, + search = false, + }, + modules = { -- List of various plugins and additional options + -- ... + }, + }, + palettes = {}, + specs = {}, + groups = {}, + }) + + -- setup must be called before loading + vim.cmd("colorscheme terafox") + end +} diff --git a/lua/themes/nord.lua b/lua/themes/nord.lua new file mode 100644 index 0000000..c9c3597 --- /dev/null +++ b/lua/themes/nord.lua @@ -0,0 +1,22 @@ +return { + "shaunsingh/nord.nvim", + lazy = false, + enabled = false, + priority = 1000, + config = function() + vim.g.nord_italic = true + vim.g.nord_italic_comments = false + vim.g.nord_bold = false + vim.g.nord_underline = true + vim.g.nord_uniform_diff_background = true + + vim.cmd [[ + augroup nord_customization + autocmd! + "your other autocmds... + autocmd ColorScheme nord ++nested hi Normal guibg=#242933 + augroup END + ]] + vim.cmd('colorscheme nord') + end +} diff --git a/lua/themes/solarized.lua b/lua/themes/solarized.lua new file mode 100644 index 0000000..dae5ff1 --- /dev/null +++ b/lua/themes/solarized.lua @@ -0,0 +1,9 @@ +return { + "ishan9299/nvim-solarized-lua", + lazy = false, + enabled = false, + priority = 1000, + config = function() + vim.cmd('colorscheme solarized-flat') + end +} diff --git a/lua/themes/sonokai.lua b/lua/themes/sonokai.lua new file mode 100644 index 0000000..51f82f2 --- /dev/null +++ b/lua/themes/sonokai.lua @@ -0,0 +1,21 @@ +return { + "sainnhe/sonokai", + lazy = false, + enabled = false, + priority = 1000, + config = function() + if vim.fn.has('termguicolors') == 1 then + vim.o.termguicolors = true + end + + vim.g.sonokai_style = 'andromeda' + vim.g.sonokai_better_performance = 1 + vim.g.sonokai_enable_italic = 1 + vim.g.sonokai_current_word = 'bold' + vim.g.sonokai_transparent_background = 1 + -- vim.g.sonokai_diagnostic_text_highlight = 1 + -- vim.g.sonokai_diagnostic_line_highlight = 1 + + vim.cmd('colorscheme sonokai') + end +} diff --git a/lua/themes/zenbones.lua b/lua/themes/zenbones.lua new file mode 100644 index 0000000..1b2ad29 --- /dev/null +++ b/lua/themes/zenbones.lua @@ -0,0 +1,26 @@ +return { + "mcchrish/zenbones.nvim", + dependencies = "rktjmp/lush.nvim", + lazy = false, + enabled = false, + priority = 1000, + config = function() + vim.cmd 'set background=dark' + + --vim.cmd "colorscheme zenbones" + --vim.g.zenbones = { transparent_background = true } + --vim.cmd "colorscheme zenwritten" + --vim.g.zenwritten = { transparent_background = true } + + --vim.cmd "colorscheme rosebones" + --vim.g.rosebones = { transparent_background = true } + + vim.cmd "colorscheme nordbones" + vim.g.nordbones = { transparent_background = true } + + --vim.cmd "colorscheme neobones" + --vim.cmd "colorscheme tokyobones" + --vim.cmd "colorscheme kanagawabones" + --vim.cmd "colorscheme randombones" + end +} diff --git a/plug-settings/autopairs.lua b/plug-settings/autopairs.lua deleted file mode 100644 index ba62d44..0000000 --- a/plug-settings/autopairs.lua +++ /dev/null @@ -1 +0,0 @@ -require("nvim-autopairs").setup {} diff --git a/plug-settings/black-indent.lua b/plug-settings/black-indent.lua deleted file mode 100644 index 5c2b8c9..0000000 --- a/plug-settings/black-indent.lua +++ /dev/null @@ -1,23 +0,0 @@ ---vim.cmd [[highlight IndentBlanklineIndent guifg=#22262F ]] -vim.opt.list = true ---vim.opt.listchars:append "trail:●" ---vim.opt.listchars:append "space:·" ---vim.opt.listchars:append "eol:↓" - -require("indent_blankline").setup({ - use_treesitter = true, - show_current_context = true, - show_current_context_start = true, - show_trailing_blankline_indent = false, - show_end_of_line = true, - space_char_blankline = " ", - buftype_exclude = { - "help", - "loclist", - "nofile", - "prompt", - "quickfix", - "terminal", - }, - filetype_exclude = { "list" }, -}) diff --git a/plug-settings/blamer.vim b/plug-settings/blamer.vim deleted file mode 100644 index b43efa0..0000000 --- a/plug-settings/blamer.vim +++ /dev/null @@ -1,6 +0,0 @@ -let g:blamer_enabled = 1 -let g:blamer_show_in_insert_modes = 0 -let g:blamer_show_in_visual_modes = 0 -highlight Blamer guifg=#434C5E -let g:blamer_template = '{} []' -let g:blamer_date_format = '%d/%m/%y' diff --git a/plug-settings/dap.lua b/plug-settings/dap.lua deleted file mode 100644 index d7dbcc4..0000000 --- a/plug-settings/dap.lua +++ /dev/null @@ -1,48 +0,0 @@ - ---local dap = require('dap') --- Configuracion debuger Javascript, Typescript y React Typescript -require("dap").adapters.firefox = { - type = "executable", - command = "node", - args = { - require("mason-registry").get_package("firefox-debug-adapter"):get_install_path() .. "/dist/adapter.bundle.js", - }, -} - -for _, language in ipairs({ "javascript", "javascriptreact", "typescript", "typescriptreact" }) do - require("dap").configurations[language] = { - { - name = "Launch Firefox against localhost", - request = "launch", - type = "firefox", - reAttach = true, - url = "http://localhost:3000", - webRoot = "${workspaceFolder}", - console = "integratedTerminal", - }, - } -end - --- Configuracion debuger Go ---dap.adapters.go = { - --type = 'executable'; - --command = 'node'; - --args = { - --require("mason-registry").get_package("go-debug-adapter"):get_install_path() .. "/dist/debugAdapter.js", - --}, ---} - ---dap.configurations.go = { - --{ - --type = 'go'; - --name = 'Debug'; - --request = 'launch'; - --showLog = false; - --program = "${file}"; - --dlvToolPath = vim.fn.exepath('/usr/bin/dlv') -- Adjust to where delve is installed - --}, ---} - -require("dapui").setup() ---Debugger Go ---require("dap-go").setup() diff --git a/plug-settings/easy-motion.vim b/plug-settings/easy-motion.vim deleted file mode 100644 index 7358056..0000000 --- a/plug-settings/easy-motion.vim +++ /dev/null @@ -1,2 +0,0 @@ -"easymotion -let g:EasyMotion_smartcase = 1 diff --git a/plug-settings/gitsigns.lua b/plug-settings/gitsigns.lua deleted file mode 100644 index 29f85a2..0000000 --- a/plug-settings/gitsigns.lua +++ /dev/null @@ -1 +0,0 @@ - require('gitsigns').setup() diff --git a/plug-settings/lspkind.lua b/plug-settings/lspkind.lua deleted file mode 100644 index 72ca5c2..0000000 --- a/plug-settings/lspkind.lua +++ /dev/null @@ -1,47 +0,0 @@ -local status, lspkind = pcall(require, "lspkind") -if (not status) then return end - -lspkind.init({ - -- enables text annotations - -- - -- default: true - mode = 'symbol', - - -- default symbol map - -- can be either 'default' (requires nerd-fonts font) or - -- 'codicons' for codicon preset (requires vscode-codicons font) - -- - -- default: 'default' - preset = 'codicons', - - -- override preset symbols - -- - -- default: {} - symbol_map = { - Text = "", - Method = "", - Function = "", - Constructor = "", - Field = "ﰠ", - Variable = "", - Class = "ﴯ", - Interface = "", - Module = "", - Property = "ﰠ", - Unit = "塞", - Value = "", - Enum = "", - Keyword = "", - Snippet = "", - Color = "", - File = "", - Reference = "", - Folder = "", - EnumMember = "", - Constant = "", - Struct = "פּ", - Event = "", - Operator = "", - TypeParameter = "" - }, -}) diff --git a/plug-settings/luaSnips.lua b/plug-settings/luaSnips.lua deleted file mode 100644 index 64fe47b..0000000 --- a/plug-settings/luaSnips.lua +++ /dev/null @@ -1,2 +0,0 @@ -require("luasnip.loaders.from_vscode").lazy_load() - diff --git a/plug-settings/lualine.lua b/plug-settings/lualine.lua deleted file mode 100644 index 7f11a6f..0000000 --- a/plug-settings/lualine.lua +++ /dev/null @@ -1,36 +0,0 @@ -require('lualine').setup { - options = { - {icons_enabled = true}, - {theme = "auto"}, - section_separators = '', - component_separators = '', - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - } - }, - sections = { - lualine_a = { - {'mode'}, - }, - lualine_b = { - { - 'filename', - path = 1, - symbols = { - modified = '[+]', - readonly = '[-]', - unnamed = '[No Name]', - newfile = '[New]', - }, - }, - }, - lualine_c = { - {'diff'},{'diagnostics'} - }, - lualine_x = {'branch'}, - lualine_y = {'location'}, - lualine_z = {'progress'}, - }, -} diff --git a/plug-settings/mason.lua b/plug-settings/mason.lua deleted file mode 100644 index b1cff5d..0000000 --- a/plug-settings/mason.lua +++ /dev/null @@ -1,5 +0,0 @@ -require("mason").setup() -require("mason-lspconfig").setup( { - automatic_installation = true, -- automatically detect which servers to install (based on which servers are set up via lspconfig) - }) - diff --git a/plug-settings/neo-tree.lua b/plug-settings/neo-tree.lua deleted file mode 100644 index 29bbeef..0000000 --- a/plug-settings/neo-tree.lua +++ /dev/null @@ -1,98 +0,0 @@ -require("neo-tree").setup({ - enable_diagnostics = true, - hide_root_node = true, - resize_timer_interval = 42, - use_default_mappings = false, - source_selector = { - winbar = true, - tab_labels = { filesystem = " 󰉓 Folders ", git_status = "  Git Control " }, - content_layout = "center", - separator = "", - separator_active = { left = "▎", right = "" }, - show_separator_on_edge = true, - }, - default_component_configs = { - container = { right_padding = 1 }, - icon = { - folder_closed = "", - folder_open = "", - folder_empty = "", - folder_empty_open = "", - default = "", - }, - modified = { symbol = "●" }, - git_status = { - symbols = { - added = "A", - deleted = "D", - modified = "M", - renamed = "R", - untracked = "U", - ignored = "!", - conflict = "C", - }, - }, - diagnostics = { - symbols = { - hint = "", - info = "", - warn = "", - error = "", - }, - }, - }, - window = { - position = "float", - popup = { - size = { height = "20", width = "50"}, - position = "50%" - }, - --width = 30, - --height = 50, - mapping_options = { - noremap = true, - nowait = true, - }, - mappings = { - [""] = "open", - ["<2-LeftMouse>"] = "open", - [""] = "open_split", - [""] = "open_vsplit", - [""] = "open_tabnew", - [""] = "refresh", - ["a"] = { "add", config = show_path }, - ["d"] = "delete", - ["r"] = "rename", - ["y"] = "copy_to_clipboard", - ["x"] = "cut_to_clipboard", - ["p"] = "paste_from_clipboard", - ["c"] = { "copy", config = show_path }, - ["m"] = { "move", config = show_path }, - ["q"] = "close_window", - ["?"] = "show_help", - ["g?"] = "show_help", - ["gb"] = "next_source", - [""] = "next_source", - ["gB"] = "prev_source", - [""] = "prev_source", - } - }, - filesystem = { - filtered_items = { - hide_dotfiles = false, - hide_gitignored = false, - } - }, - git_status = { - window = { - mappings = { - ["A"] = "git_add_all", - ["u"] = "git_unstage_file", - ["a"] = "git_add_file", - ["r"] = "git_revert_file", - ["c"] = "git_commit", - ["p"] = "git_push", - }, - }, - }, -}) diff --git a/plug-settings/null-ls.lua b/plug-settings/null-ls.lua deleted file mode 100644 index ebbd4de..0000000 --- a/plug-settings/null-ls.lua +++ /dev/null @@ -1,40 +0,0 @@ -local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) - -require("null-ls").setup({ - update_in_insert = vim.diagnostic.config().update_in_insert, - debounce = 300, - on_attach = function (client, bufnr) - if client.supports_method("textDocument/formatting") then - vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) - vim.api.nvim_create_autocmd("BufWritePre", { - group = augroup, - buffer = bufnr, - callback = function() - vim.lsp.buf.format({ bufnr = bufnr }) - require("luasnip").session.current_nodes[bufnr] = nil - end, - }) - end - end, - - sources = { - require("null-ls").builtins.diagnostics.jsonlint, - --require("null-ls").builtins.diagnostics.markdownlint, - require("null-ls").builtins.formatting.prettierd.with({ - condition = function(utils) - return utils.root_has_file({ - ".prettierrc", - ".prettierrc.json", - ".prettierrc.yaml", - ".prettierrc.yml", - ".prettierrc.json5", - ".prettierrc.js", - ".prettierrc.cjs", - "prettier.config.js", - "prettier.config.cjs", - ".prettierrc.toml", - }) - end, - }), - }, -}) diff --git a/plug-settings/nvim-cmp.vim b/plug-settings/nvim-cmp.vim deleted file mode 100644 index af96db5..0000000 --- a/plug-settings/nvim-cmp.vim +++ /dev/null @@ -1,101 +0,0 @@ -set completeopt=menu,menuone,noselect - -lua <'] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = true }), - - --- Tab tigger seleccion - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - elseif has_words_before() then - cmp.complete() - else - fallback() - end - end, { 'i', 'c' }), - - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { 'i', 'c' }), - }, - }) - - -- Set configuration for specific filetype. - cmp.setup.filetype('gitcommit', { - sources = cmp.config.sources({ - { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. - }, { - { name = 'buffer' }, - { max_item_count = 10 }, - }) - }) - - -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). - cmp.setup.cmdline('/', { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = 'buffer' } - } - }) - - -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). - cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }) - }) - - vim.cmd [[highlight! default link CmpItemKind CmpItemMenuDefault]] -EOF - diff --git a/plug-settings/tab-nine.lua b/plug-settings/tab-nine.lua deleted file mode 100644 index 75eb038..0000000 --- a/plug-settings/tab-nine.lua +++ /dev/null @@ -1,23 +0,0 @@ -require("cmp_tabnine.config").setup({ - ignored_file_types = { - ["aerial"] = true, - ["checkhealth"] = true, - ["dap-repl"] = true, - ["dapui_breakpoints"] = true, - ["dapui_console"] = true, - ["dapui_hover"] = true, - ["dapui_scopes"] = true, - ["dapui_stacks"] = true, - ["dapui_watches"] = true, - ["fern"] = true, - ["lspinfo"] = true, - ["mason"] = true, - ["nerdterm"] = true, - ["noice"] = true, - ["notify"] = true, - ["null-ls-info"] = true, - ["packer"] = true, - ["qf"] = true, - ["TelescopePrompt"] = true, - }, -}) diff --git a/plug-settings/telescope.lua b/plug-settings/telescope.lua deleted file mode 100644 index dcbb2d5..0000000 --- a/plug-settings/telescope.lua +++ /dev/null @@ -1,30 +0,0 @@ -require('telescope').setup { - initial_mode = "insert", - defaults = { - layout_config = { - vertical = { width = 0.5} - }, - file_ignore_patterns = {"node_modules", ".git"} - }, - pickers = { - find_files = { - theme = "dropdown", - hidden = true - }, - oldfiles = { - theme = "ivy" - }, - live_grep = { - }, - git_commits = { - theme = "ivy" - }, - buffers = { - ignore_current_buffer = true, - sort_mru = true, - theme = "dropdown" - } - }, - extensions = { - } -} diff --git a/plug-settings/todo-comments.lua b/plug-settings/todo-comments.lua deleted file mode 100644 index 5060084..0000000 --- a/plug-settings/todo-comments.lua +++ /dev/null @@ -1,25 +0,0 @@ -require("todo-comments").setup { - signs = true, -- show icons in the signs column - keywords = { - FIX = { - icon = " ", - color = "error", - alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, - signs = false, - }, - TODO = { icon = " ", color = "info" }, - HACK = { icon = " ", color = "warning" }, - WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, - PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, - NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, - TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" }}, - }, - colors = { - error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, - warning = { "DiagnosticWarning", "WarningMsg", "#FBBF24" }, - info = { "DiagnosticInfo", "#2563EB" }, - hint = { "DiagnosticHint", "#10B981" }, - default = { "Identifier", "#7C3AED" }, - test = { "Identifier", "#FF00FF" } - }, -} diff --git a/plug-settings/treesitter.lua b/plug-settings/treesitter.lua deleted file mode 100644 index 538635e..0000000 --- a/plug-settings/treesitter.lua +++ /dev/null @@ -1,35 +0,0 @@ -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" - ensure_installed = { "lua", "vim", "astro", "html",}, - sync_install = true, - - ignore_install = { "" }, - - highlight = { - enable = true, - --disable = {}, - additional_vim_regex_highlighting = false, - }, - autotag = { - enable = true, - filetypes = { - 'html', 'markdown', 'astro', - 'javascript', 'javascriptreact', 'tsx', - 'typescript', 'typescriptreact', 'jsx', - } - }, - rainbow = { - --enable = true, - --colors = { - --"#90b99f", - --"#e6b99d", - --"#ea83a5", - --"#aca1cf", - --"#f5a191", - --"#c1c0d4", - --"#f591b2" - --}, - --extended_mode = true, - --max_file_line = nil - } -} diff --git a/plug-settings/web-devicons.vim b/plug-settings/web-devicons.vim deleted file mode 100644 index e06c725..0000000 --- a/plug-settings/web-devicons.vim +++ /dev/null @@ -1,13 +0,0 @@ -if !exists('g:loaded_devicons') | finish | endif - -lua << EOF -require'nvim-web-devicons'.setup { - -- your personnal icons can go here (to override) - -- DevIcon will be appended to `name` - override = { - }; - -- globally enable default icons (default to false) - -- will get overriden by `get_icons` option - default = true; -} -EOF diff --git a/plug.vim b/plug.vim deleted file mode 100644 index 8b95851..0000000 --- a/plug.vim +++ /dev/null @@ -1,135 +0,0 @@ -call plug#begin('~/.local/share/nvim/plugged') - -"Temas -"Plug 'kjwon15/vim-transparent' -"Plug 'Shatur/neovim-ayu' -"Plug 'morhetz/gruvbox' -"Plug 'sainnhe/sonokai' -"Plug 'sainnhe/gruvbox-material' -"Plug 'catppuccin/nvim', {'as': 'catppuccin'} -"Plug 'wuelnerdotexe/vim-enfocado' -"Plug 'shaunsingh/nord.nvim' -"Plug 'EdenEast/nightfox.nvim' "#2 -Plug 'mcchrish/zenbones.nvim' -Plug 'rktjmp/lush.nvim'"require zenbones -"Plug 'kvrohit/mellow.nvim' -"Plug 'Everblush/nvim' -"Plug 'ishan9299/nvim-solarized-lua' - -"---- Visual -Plug 'kyazdani42/nvim-web-devicons' "Iconos modernos -Plug 'lilydjwg/colorizer' "Coloreado de codigos exadecimales de colores -"--- -"Sintaxis de Lenguajes -"Plug 'cakebaker/scss-syntax.vim' -"Plug 'pangloss/vim-javascript' -"Plug 'HerringtonDarkholme/yats.vim' -"Plug 'maxmellon/vim-jsx-pretty' -"Plug 'styled-components/vim-styled-components' -"Plug 'wuelnerdotexe/vim-astro' - -"------Git integracion - "Marcado de los cambios al costado - Plug 'lewis6991/gitsigns.nvim' - - " Menu de cambios y de commits ':G' - Plug 'tpope/vim-fugitive' -"-------- - -"------ Funcionalidades - "Busqueda keys en modo NORMAL, se usa pulsando 'f' - Plug 'easymotion/vim-easymotion' - - "Plugin de busqueda - Plug 'nvim-telescope/telescope.nvim' - - Plug 'tpope/vim-surround' - - "Plugin para mover lineas en modo Normal o Visual, se usa con "ALT +{j,k} - Plug 'matze/vim-move' - - "Terminal integrada con 'CRTL + T' - Plug 'wuelnerdotexe/nerdterm' - - "visual multiples lineas - Plug 'mg979/vim-visual-multi', {'branch': 'master'} - - "Comentar lineas de codigo en modo NORMAL - Plug 'scrooloose/nerdcommenter' -"-------- - -"------Tmux -Plug 'benmills/vimux' -Plug 'christoomey/vim-tmux-navigator' -"------ -" -Plug 'godlygeek/tabular' - -"---- Plugins de nvim -if has("nvim") - Plug 'neovim/nvim-lspconfig' - Plug 'williamboman/mason.nvim' - Plug 'williamboman/mason-lspconfig.nvim' "Instalador de servidores de LSP - Plug 'hrsh7th/cmp-nvim-lsp' - Plug 'hrsh7th/cmp-buffer' - Plug 'hrsh7th/nvim-cmp' - Plug 'hrsh7th/cmp-path' - Plug 'hrsh7th/cmp-cmdline' - Plug 'onsails/lspkind-nvim' "Iconos del CMP - Plug 'folke/lsp-colors.nvim' "Colores para LSP - Plug 'tzachar/cmp-tabnine', { 'do': './install.sh' } "AutoCompletado Tabnine - - "---- Barras de estado y pestañas - "Plug 'akinsho/bufferline.nvim', {'tags': 'v3.*'} - Plug 'nvim-lualine/lualine.nvim' - "---- - - "Snipets con LuaSnip - Plug 'L3MON4D3/LuaSnip' - Plug 'saadparwaiz1/cmp_luasnip' - Plug 'rafamadriz/friendly-snippets' - - "----- Funcionalidades de editor - Plug 'nvim-lua/plenary.nvim' - - "Marcado de indentación - Plug 'lukas-reineke/indent-blankline.nvim' - - "Auto parentesis y corchetes - Plug 'windwp/nvim-autopairs' - - Plug 'MunifTanjim/nui.nvim' "Require neo-tree - Plug 'nvim-neo-tree/neo-tree.nvim' - - "auto tag para html - Plug 'windwp/nvim-ts-autotag' - - Plug 'mrjones2014/nvim-ts-rainbow' - - "Inspirado en Git Lens de VS Code - "Plug "APZelos/blamer.nvim" - - "Colorea los comentarios en forma de TODO: - Plug 'folke/todo-comments.nvim' - "------------ - - "Sintaxis de arboles de lenguajes - Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} - - "Config Prettier y Eslint - Plug 'jose-elias-alvarez/null-ls.nvim' - - "-------Debuger - Plug 'mfussenegger/nvim-dap' - Plug 'rcarriga/nvim-dap-ui' - "----- - - " Configuracion de lenguaje go para nvim - Plug 'ray-x/go.nvim' - Plug 'ray-x/guihua.lua' - - "debuger go - "Plug 'leoluz/nvim-dap-go' -endif - -call plug#end() diff --git a/themes/ayu.lua b/themes/ayu.lua deleted file mode 100644 index 4ca1b9d..0000000 --- a/themes/ayu.lua +++ /dev/null @@ -1,10 +0,0 @@ -require('ayu').setup({ - overrides = function() - if vim.o.background == 'dark' then - return { NormalNC = {bg = '#060C11', fg = '#808080'} } - else - return { NormalNC = {bg = '#f0f0f0', fg = '#808080'} } - end - end -}) -require('ayu').colorscheme() diff --git a/themes/catppuccin.lua b/themes/catppuccin.lua deleted file mode 100644 index 4833cf4..0000000 --- a/themes/catppuccin.lua +++ /dev/null @@ -1,34 +0,0 @@ -vim.g.catppuccin_flavour = "frappe" -- latte, frappe, macchiato, mocha - -require("catppuccin").setup { - flavour = "macchiato", - transparent_background = false, - highlight_overrides = { - }, - styles = { - comments = {}, - conditionals = {}, - loops = {}, - functions = {"italic"}, - keywords = {}, - strings = {}, - variables = {}, - numbers = {}, - booleans = {}, - properties = {}, - types = {"bold"}, - operators = {}, - }, - integrations = { - cmp = true, - gitsigns = true, - nvimtree = true, - --telescope = true, - treesitter = true, - indent_blankline = { - enabled = true, - colored_indent_levels = true, - }, - }, -} -vim.cmd [[colorscheme catppuccin]] diff --git a/themes/enfocado.vim b/themes/enfocado.vim deleted file mode 100644 index 20d8044..0000000 --- a/themes/enfocado.vim +++ /dev/null @@ -1,36 +0,0 @@ -"let g:enfocado_style = 'neon' -let g:enfocado_plugins = [ - \ 'aerial', - \ 'bufferline', - \ 'cmp', - \ 'dap-ui', - \ 'gitsigns', - \ 'illuminate', - \ 'indent-blankline', - \ 'lazy', - \ 'lspconfig', - \ 'matchup', - \ 'neo-tree', - \ 'noice', - \ 'null-ls', - \ 'smoothcursor', - \ 'substitute', - \ 'surround', - \ 'telescope', - \ 'treesitter', - \ 'ts-rainbow2', - \ 'visual-multi', - \ 'yanky' - \ ] -augroup enfocado_customization - autocmd! - " your other autocmds... - autocmd ColorScheme enfocado ++nested highlight Type cterm=NONE gui=NONE - autocmd ColorScheme enfocado ++nested highlight TypeBuiltin cterm=NONE gui=NONE - "autocmd ColorScheme enfocado ++nested hi @type guifg=#F09383 - "autocmd ColorScheme enfocado ++nested hi @variable guifg=#AA554D - "autocmd ColorScheme enfocado ++nested hi @function guifg=#DB635D - "autocmd ColorScheme enfocado ++nested hi @function guifg=#DB635D -augroup END - -colorscheme enfocado diff --git a/themes/everblush.lua b/themes/everblush.lua deleted file mode 100644 index 16b9985..0000000 --- a/themes/everblush.lua +++ /dev/null @@ -1,9 +0,0 @@ -require('everblush').setup({ - -- Default options - override = {}, - transparent_background = false, - nvim_tree = { - contrast = false, - }, -}) -vim.cmd('colorscheme everblush') diff --git a/themes/gruvboxMaterial.vim b/themes/gruvboxMaterial.vim deleted file mode 100644 index a197e3d..0000000 --- a/themes/gruvboxMaterial.vim +++ /dev/null @@ -1,5 +0,0 @@ -let g:gruvbox_material_background = 'hard' -let g:gruvbox_material_enable_bold = 1 -let g:gruvbox_material_enable_italic = 1 -"let g:gruvbox_material_transparent_background = 1 -colorscheme gruvbox-material diff --git a/themes/mellow.lua b/themes/mellow.lua deleted file mode 100644 index de89a1c..0000000 --- a/themes/mellow.lua +++ /dev/null @@ -1,11 +0,0 @@ --- Lua ---vim.g.mellow_italic_functions = true ---vim.g.mellow_bold_functions = true ---vim.g.mellow_bold_variables = true -vim.g.mellow_italic_keywords = true -vim.g.mellow_bold_keywords = true -vim.g.mellow_transparent = true - -vim.cmd [[colorscheme mellow]] - - diff --git a/themes/nightfox.lua b/themes/nightfox.lua deleted file mode 100644 index 57bc7fc..0000000 --- a/themes/nightfox.lua +++ /dev/null @@ -1,37 +0,0 @@ -require('nightfox').setup({ - options = { - -- Compiled file's destination location - compile_path = vim.fn.stdpath("cache") .. "/nightfox", - compile_file_suffix = "_compiled", -- Compiled file suffix - --transparent = true, -- Disable setting background - terminal_colors = true, -- Set terminal colors (vim.g.terminal_color_*) used in `:terminal` - dim_inactive = false, -- Non focused panes set to alternative background - module_default = true, -- Default enable value for modules - styles = { -- Style to be applied to different syntax groups - comments = "italic", - conditionals = "NONE", - constants = "NONE", - functions = "bold", - keywords = "NONE", - numbers = "NONE", - operators = "bold", - strings = "NONE", - types = "italic", - variables = "NONE", - }, - inverse = { -- Inverse highlight for different types - match_paren = false, - visual = false, - search = false, - }, - modules = { -- List of various plugins and additional options - -- ... - }, - }, - palettes = {}, - specs = {}, - groups = {}, -}) - --- setup must be called before loading -vim.cmd("colorscheme terafox") diff --git a/themes/nord.vim b/themes/nord.vim deleted file mode 100644 index 70a6774..0000000 --- a/themes/nord.vim +++ /dev/null @@ -1,13 +0,0 @@ - let g:nord_italic = v:true - let g:nord_italic_comments = v:false - let g:nord_bold = v:false - let g:nord_underline = v:true - let g:nord_uniform_diff_background = v:true - -augroup nord_customization - autocmd! - " your other autocmds... - autocmd ColorScheme nord ++nested hi Normal guibg=#242933 -augroup END - -colorscheme nord diff --git a/themes/solarized.lua b/themes/solarized.lua deleted file mode 100644 index 04949c4..0000000 --- a/themes/solarized.lua +++ /dev/null @@ -1 +0,0 @@ -vim.cmd('colorscheme solarized-flat') diff --git a/themes/sonokai.vim b/themes/sonokai.vim deleted file mode 100644 index 8dca8ad..0000000 --- a/themes/sonokai.vim +++ /dev/null @@ -1,14 +0,0 @@ -" Important!! - if has('termguicolors') - set termguicolors - endif - " The configuration options should be placed before `colorscheme sonokai`. -let g:sonokai_style = 'andromeda' -let g:sonokai_better_performance = 1 -let g:sonokai_enable_italic = 1 -let g:sonokai_current_word = 'bold' -let g:sonokai_transparent_background = 1 - " let g:sonokai_diagnostic_text_highlight = 1 -" let g:sonokai_diagnostic_line_highlight = 1 -colorscheme sonokai - diff --git a/themes/zenbones.lua b/themes/zenbones.lua deleted file mode 100644 index 5dcfac0..0000000 --- a/themes/zenbones.lua +++ /dev/null @@ -1,21 +0,0 @@ - -vim.cmd 'set background=dark' - ---vim.cmd "colorscheme zenbones" ---vim.g.zenbones = { transparent_background = true } ---vim.cmd "colorscheme zenwritten" ---vim.g.zenwritten = { transparent_background = true } - ---vim.cmd "colorscheme rosebones" ---vim.g.rosebones = { transparent_background = true } - -vim.cmd "colorscheme nordbones" -vim.g.nordbones = { transparent_background = true } - ---vim.cmd "colorscheme neobones" - ---vim.cmd "colorscheme tokyobones" - ---vim.cmd "colorscheme kanagawabones" - ---vim.cmd "colorscheme randombones"