Skip to content

Instantly share code, notes, and snippets.

@nullx5
Last active July 16, 2025 05:39
Show Gist options
  • Save nullx5/57941e66a2d9f33237fa9f241a6f6c69 to your computer and use it in GitHub Desktop.
Save nullx5/57941e66a2d9f33237fa9f241a6f6c69 to your computer and use it in GitHub Desktop.

instalar y configurar nvchad neovim nvim ubuntu 24.04

Eliminar configuracion previa
rm -rf ~/.config/nvim ~/.local/share/nvim ~/.cache/nvim

download neovim latest 0.11.2
wget https://github.com/neovim/neovim/releases/download/v0.11.2/nvim-linux-x86_64.tar.gz
7z x nvim-linux-x86_64.tar.gz
cd nvim-linux-x86_64
sudo chmod u+x bin/nvim


sudo mkdir -p /opt/nvim
sudo mv * /opt/nvim
sudo ln -sf /opt/nvim/bin/nvim /usr/local/bin/nvim

nvim --version


sudo apt install ripgrep build-essential 

git clone https://github.com/NvChad/starter ~/.config/nvim

nvim

Run :MasonInstallAll command after lazy.nvim finishes downloading plugins.
Delete the .git folder from nvim folder.
Learn customization of ui & base46 from :h nvui.

# configurar numeros relativos
nvim ~/.config/nvim/lua/options.lua
require "nvchad.options"
vim.opt.number = true
vim.opt.relativenumber = true

:Mason   # LSP - DAP - Linter - Formatter

ENTER + i # para instalar LSP - DAP - Linter - Formatter

sudo apt install nodejs npm

:Mason

      emmet-language-server
      emmet-ls
      html-lsp
      lua-language-server
      stylua
    
:h nvui
Archivos principales de configuracion:
init.lua
chadrc.lua
lspconfig.lua

autocomopletado HTML y expansion de comandos ej: div*3 + ENTER:

image

nvim /home/blessed/.config/nvim/lua/configs/lspconfig.lua

require("nvchad.configs.lspconfig").defaults()

local lspconfig = require "lspconfig"

local servers = { "html", "cssls", "emmet_ls" }

lspconfig.emmet_ls.setup {
  filetypes = {
    "html", "css", "javascript", "javascriptreact", "typescriptreact",
    "vue", "svelte", "xml", "blade", "php"
  },
  init_options = {
    html = {
      options = {
        ["bem.enabled"] = true,
      },
    },
  },
}

nvim /home/blessed/.config/nvim/lua/plugins/init.lua


return {
  {
    "stevearc/conform.nvim",
    -- event = 'BufWritePre', -- uncomment for format on save
    opts = require "configs.conform",
  },

  {
    "neovim/nvim-lspconfig",
    config = function()
      require "configs.lspconfig"
    end,
  },

  {
    "mattn/emmet-vim",
    ft = { "html", "css", "javascript", "typescriptreact", "vue", "svelte" },
    init = function()
      vim.g.user_emmet_leader_key = '<C-y>'
    end,
  },
}

Revisar gestor de plugins por defecto NvChad usa Lazy:

:Lazy

Atajos NVChad


:Mason
:MasonInstallAll   # despues de agregar LSP en lscpconfig.lua
:Lazy
:Nvdash 
:h nvui
:Mason
:Nvdash 

space + t + h             # seleccionar theme:
        hiberbee  # python OK html OK
        yoru      # python OK html OK
        ayu_dark  # python OK html OK
      
 space + e        # abrir NerdTree
 space + q        # cerar NerdTre
 space + h        # abre terminal
 a                # crear nuevo archivo
 a                # crear carpeta agregar / al final nueva_carpeta/
 d                # eliminar archivo o carpeta
 tab              # navegar entre buffers(pestañas) hacia adelante
 shift + tab      # navegar entre buffers(pestañas) hacia adelante
 space + x        # cierra buffers(pestañas)
 alt + h          # cambiar a panel izquierdo
 alt + l          # cambiar a panel derecho
 alt + j          # cambiar a panel abajo
 alt + k          # cambiar a panel arriba
 ctrl + k         # sobre archivo  - fullpath - size - date creation
 -                # subir en el arbol de directorios
 f + f            # buscar archivos, depende de la ruta relativa de donde se halla abierto nvim
 f + w            # buscar palabra en archivos
 f + o            # buscar archivos recientes
 f + w            # buscar palabra
 c + h            # mappings
https://www.youtube.com/watch?v=E67v6Zpb8RU


# inestigar como instala plugin nvim-cmp
nvim-cmp is a completion plugin for Neovim coded in Lua.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment