Skip to content

📌 This plugin allows you to easily identify the value of a CSS variable from any other files.

License

Notifications You must be signed in to change notification settings

farias-hecdin/CSSVarViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Translate this file into your native language using Google Translate or a similar service.

CSSVarViewer

Este plugin para Neovim te permite identificar fácilmente el valor de las variables CSS que has definido previamente en tus archivos de estilo, como main.css o style.css. Cuando el plugin detecta una variable CSS en estos archivos, la muestra en un texto virtual, lo que facilita su visualización desde cualquier otro archivo.

🗒️ Requerimientos

  • Neovim: Versión 0.7 o superior.

Instalación

Usando folke/lazy.nvim:

{
    'farias-hecdin/CSSVarViewer',
    ft = "css",
    config = true,
    -- If you want to configure some options, replace the previous line with:
    -- config = function()
    -- end,
}

🗒️ Configuración

Estas son las opciones de configuración predeterminadas:

require('CSSVarViewer').setup({
  parent_search_limit = 5,-- <number> Parent search limit (number of levels to search upwards).
  filename_to_track = "main", -- <string> Name of the file to track (e.g. "main" for main.css).
  disable_keymaps = false, -- <boolean> Indicates whether keymaps are disabled.
})

Comandos y atajos de teclado

Comandos Modo Atajos de teclado Descripción
CSSVarViewer Normal <leader>cv Activa el plugin y actualiza los datos
CSSVarViewer Visual <leader>cv Pega el texto virtual en el cursor

Puedes ampliar la búsqueda de archivos hacia un directorio específico o analizar otros archivos utilizando el comando :CSSVarViewer, cuya sintaxis es la misma que la utilizada en CSSVarHighlight. Es decir:

:CSSVarViewer <filename> <attempt_limit | dir>

Si deseas pegar el valor del texto virtual, selecciona la variable CSS en modo visual (por ejemplo, var(--primary-rgb)) y luego presiona <leader>cv o utiliza el comando :CSSVarViewer.

🛡️ Licencia

CSSVarViewer está bajo la licencia MIT. Consulta el archivo LICENSE para obtener más información.

About

📌 This plugin allows you to easily identify the value of a CSS variable from any other files.

Topics

Resources

License

Stars

Watchers

Forks

Languages