This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Creamos un grupo de autocomandos para organizar mejor | |
-- Aplicar mapeos cuando se abre un buffer de oil | |
vim.api.nvim_create_autocmd("FileType", { | |
pattern = "oil", | |
callback = function() | |
local bufnr = vim.api.nvim_get_current_buf() | |
-- Establecer h para ir al directorio padre | |
vim.keymap.set("n", "h", function() | |
require("oil.actions").parent.callback() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Source: https://michaeluloth.com/neovim-switch-configs/ | |
alias zvim='NVIM_APPNAME=nvim-lazyvim nvim' # LazyVim | |
alias cvim='NVIM_APPNAME=nvim-nvchad nvim' # NvChad | |
alias kvim='NVIM_APPNAME=nvim-kickstart nvim' # Kickstart | |
alias avim='NVIM_APPNAME=nvim-astrovim nvim' # AstroVim | |
alias lvim='NVIM_APPNAME=nvim-lunarvim nvim' # LunarVim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createContext, ReactNode, useContext, useState } from 'react'; | |
import { Book } from 'types'; | |
interface CartItem { | |
book: Book; | |
quantity: number; | |
} | |
interface CartContextType { | |
cart: CartItem[]; | |
} | |
const CartContext = createContext<CartContextType | undefined>(undefined); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Remplazar la funcion create del archivo init.lua | |
-- C:\Users\nameUser\AppData\Local\nvim-data\lazy\ui\lua\nvchad\term | |
local function create(opts) | |
local buf_exists = opts.buf | |
opts.buf = opts.buf or vim.api.nvim_create_buf(false, true) | |
-- Detectar el sistema operativo | |
local is_windows = vim.fn.has('win32') == 1 or vim.fn.has('win64') == 1 | |
-- Configurar shell según el sistema operativo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState } from 'react'; | |
type UseCounterConfig = { | |
min?: number; | |
max?: number; | |
}; | |
type CounterActions = { | |
increment: () => void; | |
decrement: () => void; |