diff --git a/docusaurus.config.js b/docusaurus.config.js index 5db29b15..a694e38b 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -25,8 +25,9 @@ const config = { // metadata like html lang. For example, if your site is Chinese, you may want // to replace "en" with "zh-Hans". i18n: { + defaultLocale: "en", - locales: ["en", "de", "es"], + locales: ["en", "de", "es", "it"], localeConfigs: { en: { label: "English", @@ -34,6 +35,9 @@ const config = { de: { label: "Deutsch", }, + it: { + label: "Italiano", + } es: { label: "Español", }, @@ -78,7 +82,7 @@ const config = { ], primaryCTA: { text: "Install", - to: "/docs/installation", + to: "docs/installation", }, // secondary call to action is optional secondaryCTA: { @@ -168,6 +172,10 @@ const config = { type: "localeDropdown", position: "right", }, + { + type: 'localeDropdown', + position: 'right', + }, ], }, prism: { diff --git a/i18n/it/docusaurus-plugin-content-docs/current/01-introduction.md b/i18n/it/docusaurus-plugin-content-docs/current/01-introduction.md new file mode 100644 index 00000000..115cf87b --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/01-introduction.md @@ -0,0 +1,22 @@ +--- +title: Introduzione +--- + +Logo di LunarVim + +# Introduction + +LunarVim è un IDE layer opinionato, estendibile e veloce per Neovim >= 0.7.0. LunarVim trae vantaggio dalle ultimissime funzionalità di Neovim come [Treesitter](https://tree-sitter.github.io/tree-sitter/) e il supporto per il [Language Server Protocol](https://en.wikipedia.org/wiki/Language_Server_Protocol). + + +## Opinionato + +LunarVim viene fornito con una configurazione predefinita sensata che ti permette di costruirci sopra. Le funzionalità includono auto completamento, terminale integrato, esploratore di file, fuzzy finder, LSP, linting, formattazione e debugging. + +## Estendibile + +Solo perché LunarVim ha un'opinione non vuol dire che devi condividerla. Ogni componente aggiuntivo incorporato può essere acceso o spento nel file `config.lua`. Questo è il punto dove potrai aggiungere i tuoi componenti aggiuntivi, definire le scorciatoie da tastiera, autocomandi, associazioni con il tasto leader e tutte le altre impostazioni personalizzate. + +## Veloce + +LunarVim carica pigramente i componenti aggiuntivi dove possibile per massimizzare la velocità. I componenti aggiuntivi disattivati inoltre non diminuiranno la velocità visto che la lista dei componenti aggiuntivi viene compilata solo con quelli attivi. Questa strategia permette a LunarVim di non dover scegliere tra funzionalità e velocità. diff --git a/i18n/it/docusaurus-plugin-content-docs/current/02-installation.md b/i18n/it/docusaurus-plugin-content-docs/current/02-installation.md new file mode 100644 index 00000000..b44bdda1 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/02-installation.md @@ -0,0 +1,125 @@ +# Installazione + +## Prerequisiti + +- Assicurati di aver installato l'ultima versione di [`Neovim v0.7.2+`](https://github.com/neovim/neovim/releases/latest). +- Assicurati di aver installato `git`, `make`, `pip`, `npm`, `node` e `cargo` nel tuo sistema. +- [Risolvi i permessi `EACCES` quando installi i pachetti globalmente](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally) per evitare errori quando installi pachetti con npm. + +# Installare + +Ci sono diversi modi per installare LunarVim. + +## Stabile + +Nessun allarme o sorpresa: + +```bash +bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh) +``` + +## Rolling + +Tutte le nuove funzionalità con tutti i nuovi bug: + +```bash +LV_BRANCH=rolling bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/rolling/utils/installer/install.sh) +``` + +Puoi anche usare questo helper script per ottenere l'ultimo binario di neovim: + +```bash +bash <(curl -s https://raw.githubusercontent.com/LunarVim/LunarVim/rolling/utils/installer/install-neovim-from-release) +``` + +Assicurati di controllare la sezione di [risoluzione degli errori](./troubleshooting/README.md) se riscontri dei problemi. + +## Suggerimenti per gli utenti di WSL2 + +Quando usi LunarVim dentro WSL2, ci sono alcune cose di cui dovresti essere a conoscenza: + +1. Evita di usare LunarVim dentro la cartella di Windows, es. `/mnt/c`, a causa di problemi di prestazioni del filesystem, vedi [WSL#4197](https://github.com/microsoft/WSL/issues/4197). +2. Alcuni utenti di WSL2 hanno riscontrato che ottenere gli appunti potrebbe essere lento. Una soluzione temporanea è chiamare il gestore degli appunti dal lato di Windows. Neovim cerca di usare [win32yank.exe](https://github.com/equalsraf/win32yank) se è disponibile. Dunque installalo e imposta il valore di `clipboard` esplicitamente: + +```lua +if vim.fn.has "wsl" == 1 then + vim.g.clipboard = { + copy = { + ["+"] = "win32yank.exe -i --crlf", + ["*"] = "win32yank.exe -i --crlf", + }, + paste = { + ["+"] = "win32yank.exe -o --lf", + ["*"] = "win32yank.exe -o --lf", + }, + } +end + +``` + +3. Alcuni utenti di WSL2 riscontrano che aprire i buffer all'avvio necessita di molto tempo. +Una possibile soluzione è aggiungere quanto segue al tuo file `/etc/wsl.conf`: + +```ini +[automount] +# Impostare questo a vero monterà automaticamente i dischi fissi (C:/ o D:/) con DrvFs sotto la cartella radice impostata sotto. Impostarlo a falso significa che i dischi non saranno montati automaticamente, ma dovranno essere montati a mano o con fstab. +enabled = false + +# Imposta il file `/etc/fstab` per essere processato quando una distribuzione WSL viene lanciata. +mountFsTab = false + +# Imposta se WSL supporta processi interoperativi come lanciare app Windows e aggiungere variabili di percorso. Impostare questi valori a falos bloccherà il lancio di processi Windows e bloccherà l'aggiunta delle variabili di ambiente $PATH. +[interop] +enabled = false +appendWindowsPath = false +``` + +Riferimento: [WSL automount settings](https://docs.microsoft.com/en-us/windows/wsl/wsl-config#automount-settings) + +## Suggerimenti per gli utenti di Neovide + +Per usare LunarVim con [Neovide](https://github.com/neovide/neovide) devi aggiungere la riga seguente al tuo file `config.lua`: + +```lua +vim.o.guifont = "Nome del tuo font" +``` + +Dove `Nome del tuo font` è il nome letterale del font che vuoi usare. Per esempio `"Inconsolata Nerd Font"`. +Avrai anche bisogno di esportare le variabili d'ambiente corrette e chiamare neovide con i parametri corretti. Un modo semplice per ottenere ciò e creare un piccolo script eseguibile, come per esempio `~/.local/bin/lvim-gui` + +```bash +#!/bin/sh +# ~/.local/bin/lvim-gui +export LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-"$HOME/.local/share/lunarvim"}" +export LUNARVIM_CONFIG_DIR="${LUNARVIM_CONFIG_DIR:-"$HOME/.config/lvim"}" +export LUNARVIM_CACHE_DIR="${LUNARVIM_CACHE_DIR:-"$HOME/.cache/lvim"}" + +exec neovide -- -u "$LUNARVIM_RUNTIME_DIR/lvim/init.lua" "$@" +``` + +Poi forniscigli i permessi di esecuzione appropriati + +```bash +chmod +x ~/.local/bin/lvim-gui +``` + +E d'ora in poi potrai lanciare in questo modo: + +```bash +lvim-gui +# o con parametri +lvim-gui some-file +``` + +## Disinstallazione + +Puoi rimuovere LunarVim (inclusi i file di configurazione) usando lo script `uninstall` incluso + +```bash +bash ~/.local/share/lunarvim/lvim/utils/installer/uninstall.sh +# oppure +bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/uninstall.sh) +``` + + + diff --git a/i18n/it/docusaurus-plugin-content-docs/current/03-quick-start.md b/i18n/it/docusaurus-plugin-content-docs/current/03-quick-start.md new file mode 100644 index 00000000..94fba5c8 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/03-quick-start.md @@ -0,0 +1,47 @@ +# Quick start + +Dopo l'installazione dovresti essere in grado di avviare LunarVim con il comando `lvim`. + +## Aggiungere `lvim` a `$PATH` + +If your terminal can't find the `lvim` command, [add the installation folder to your path](https://gist.github.com/nex3/c395b2f8fd4b02068be37c961301caa7) or move the lvim command to somewhere in your path. The default install folder is `~/.local/bin`. +Se il tuo terminale non riesce a trovare il comando `lvim`, [aggiungi la cartella di installazione al tuo percorso](https://gist.github.com/nex3/c395b2f8fd4b02068be37c961301caa7) o sposta il comando lvim da qualche parte nel tuo percorso. La cartella di installazione predefinita è `~/.local/bin`. + +## Tree-sitter + +Per installare il supporto per la colorazione sintattica e treesitter per il tuo linguaggio: + +```vim +:TSInstall +``` + +**NOTA:** `` indica che dovresti premere il tasto `` e scorrere tra le opzioni + +Non tutti i linguaggi sono supportati. Per una lista di linguaggi supportati [vedi qui](https://github.com/nvim-treesitter/nvim-treesitter#supported-languages) + +## Language Server + +Per installare un Language Server per il tuo linguaggio: + +```vim +:LspInstall +``` + +A volte il language server per il tuo linguaggio non avrà un nome ovvio. Per esempio, il language server per ruby è solargraph. Metals è il language server per scala, ecc. Per trovare il language server corrispondente per ilo tuo linguaggio [vedi qui](https://github.com/williamboman/nvim-lsp-installer) + +## Formattazione e Linting + +Formattazione e linting non sono supportati da alcuni LSP. +Dovranno essere installati / configurati separatamente. + +Vedi in [linguaggi](./languages/README.md) dove può essere gesito ogni linguaggio con il proprio formattatore e linting. + +## Nerd Fonts + +È consigliato un [nerd font](https://www.nerdfonts.com/). Altrimenti alcuni simboli non verranno mostrati correttamente. Per ulteriori informazioni visita la [sezione di configurazione](./configuration/04-nerd-fonts.md). + +## Passaggi successivi + +- Impara come [configurare LunarVim](./configuration/README.md) +- Informati su i [plugin installati](./plugins/README.md) +- Impara come configurare LunarVim per il tuo [linguaggio](./languages/README.md) diff --git a/i18n/it/docusaurus-plugin-content-docs/current/_category_.json b/i18n/it/docusaurus-plugin-content-docs/current/_category_.json new file mode 100644 index 00000000..1f79ec67 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/_category_.json @@ -0,0 +1,3 @@ +{ + "position": 6 +} diff --git a/i18n/it/docusaurus-plugin-content-docs/current/community/01-meet-the-team.md b/i18n/it/docusaurus-plugin-content-docs/current/community/01-meet-the-team.md new file mode 100644 index 00000000..d33755e8 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/community/01-meet-the-team.md @@ -0,0 +1,13 @@ +# Conosci il team + +Christian Chiarulli + +[Abouzar Parvan](https://github.com/abzcoding/) + +[Nelson Jovel](https://github.com/rebuilt) + +[Sngmin Chae](https://github.com/chaeing) + +[Luc Sinet](https://github.com/Tastyep) + +(altri sviluppatore per favore fate una pr e aggiungete il vostro nome dove volete) diff --git a/i18n/it/docusaurus-plugin-content-docs/current/community/README.md b/i18n/it/docusaurus-plugin-content-docs/current/community/README.md new file mode 100644 index 00000000..99a5a2fb --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/community/README.md @@ -0,0 +1,11 @@ +# Links + +- 🔌 Ask questions and get support on [Discord](https://discord.gg/Xb9B4Ny) +- 📹 Follow me on [YouTube](https://www.youtube.com/channel/UCS97tchJDq17Qms3cux8wcA) +- 📺 I'd rather you join me on [Odysee](https://odysee.com/@chrisatmachine:f) +- 🐦 Connect on [Twitter](https://twitter.com/chrisatmachine) +- 🎙️ You can also find us on [Matrix](https://matrix.to/#/+atmachine:matrix.org) +- 💳 Support on [Patreon](https://www.patreon.com/chrisatmachine) +- 🪙 Stake DEV token with LunarVim on [stakes.social](https://stakes.social/0xe014A52354136B678ff5030397224179bD0F9657) +- ❤️ Sponsor me [sponsor page](https://github.com/sponsors/ChristianChiarulli) +- 🌑 Share your LunarVim config [here](https://github.com/LunarVim/LunarVimCommunity) diff --git a/i18n/it/docusaurus-plugin-content-docs/current/community/_category_.json b/i18n/it/docusaurus-plugin-content-docs/current/community/_category_.json new file mode 100644 index 00000000..4c91cc88 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/community/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Community", + "position": 9 +} diff --git a/i18n/it/docusaurus-plugin-content-docs/current/community/faq.md b/i18n/it/docusaurus-plugin-content-docs/current/community/faq.md new file mode 100644 index 00000000..63474c73 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/community/faq.md @@ -0,0 +1,62 @@ +--- +sidebar: auto +--- + +# FAQ + +## How do I [..] ? + +### How do I add my own keybindings? + +- View all defaults by pressing `Lk` +- change the leader key + +```lua +lvim.leader = "space" +``` + +- Add your own binding + +```lua +-- save the buffer +lvim.keys.normal_mode[""] = ":w" +-- move the cursor without leaving insert mode +lvim.keys.insert_mode[""] = "" +lvim.keys.insert_mode[""] = "" +``` + +- Remove or un-map a default binding + +```lua +-- disable completely +lvim.keys.normal_mode[""] = "" +-- define a new behavior +lvim.keys.normal_mode[""] = ":q" +``` + +- You can also use the NeoVim API directly using [nvim_set_keymap]() + +```lua +vim.api.nvim_set_keymap("i", "", "Telescope find_files", { noremap = true, silent = true, expr = true }) +``` + +- Or you can use the native vim way for those tricky bindings that you are not sure how to translate just yet + +```lua +-- Search and replace word under cursor using +vim.cmd [[ nnoremap :%s///gc$F/i ]] +``` + +## What is `null-ls` and why do you use it? + +For C/C++ we have the `clangd` by `llvm` which can also use its siblings' abilities `clang-tidy` and `clang-format` to support additional linting and formatting. But something like `pyright` doesn't support formatting, so we use `null-ls` to register `black` and `flake8` for example, as a "fake" language server. + +Since it's not using a separate binary it's called `null-ls` or _null language server_. + +## Where can I find some example configs? + +If you want ideas for configuring LunarVim you can look at these repositories. + +- Chris - [https://github.com/ChristianChiarulli/lvim](https://github.com/ChristianChiarulli/lvim) +- Abouzar -[ https://github.com/abzcoding/lvim ](https://github.com/abzcoding/lvim) +- Nelson -[ https://github.com/rebuilt/lvim ](https://github.com/rebuilt/lvim) diff --git a/i18n/it/docusaurus-plugin-content-docs/current/configuration/01-settings.md b/i18n/it/docusaurus-plugin-content-docs/current/configuration/01-settings.md new file mode 100644 index 00000000..9ad055de --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/configuration/01-settings.md @@ -0,0 +1,56 @@ +# General Settings + +To set options use + +```lua +vim.opt.{option} +``` + +## Example options + +```lua +vim.opt.backup = false -- creates a backup file +vim.opt.clipboard = "unnamedplus" -- allows neovim to access the system clipboard +vim.opt.cmdheight = 2 -- more space in the neovim command line for displaying messages +vim.opt.colorcolumn = "99999" -- fixes indentline for now +vim.opt.completeopt = { "menuone", "noselect" } +vim.opt.conceallevel = 0 -- so that `` is visible in markdown files +vim.opt.fileencoding = "utf-8" -- the encoding written to a file +vim.opt.foldmethod = "manual" -- folding set to "expr" for treesitter based folding +vim.opt.foldexpr = "" -- set to "nvim_treesitter#foldexpr()" for treesitter based folding +vim.opt.guifont = "monospace:h17" -- the font used in graphical neovim applications +vim.opt.hidden = true -- required to keep multiple buffers and open multiple buffers +vim.opt.hlsearch = true -- highlight all matches on previous search pattern +vim.opt.ignorecase = true -- ignore case in search patterns +vim.opt.mouse = "a" -- allow the mouse to be used in neovim +vim.opt.pumheight = 10 -- pop up menu height +vim.opt.showmode = false -- we don't need to see things like -- INSERT -- anymore +vim.opt.showtabline = 2 -- always show tabs +vim.opt.smartcase = true -- smart case +vim.opt.smartindent = true -- make indenting smarter again +vim.opt.splitbelow = true -- force all horizontal splits to go below current window +vim.opt.splitright = true -- force all vertical splits to go to the right of current window +vim.opt.swapfile = false -- creates a swapfile +vim.opt.termguicolors = true -- set term gui colors (most terminals support this) +vim.opt.timeoutlen = 100 -- time to wait for a mapped sequence to complete (in milliseconds) +vim.opt.title = true -- set the title of window to the value of the titlestring +vim.opt.titlestring = "%<%F%=%l/%L - nvim" -- what the title of the window will be set to +vim.opt.undodir = vim.fn.stdpath "cache" .. "/undo" +vim.opt.undofile = true -- enable persistent undo +vim.opt.updatetime = 300 -- faster completion +vim.opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program) it is not allowed to be edited +vim.opt.expandtab = true -- convert tabs to spaces +vim.opt.shiftwidth = 2 -- the number of spaces inserted for each indentation +vim.opt.tabstop = 2 -- insert 2 spaces for a tab +vim.opt.cursorline = true -- highlight the current line +vim.opt.number = true -- set numbered lines +vim.opt.relativenumber = false -- set relative numbered lines +vim.opt.numberwidth = 4 -- set number column width to 2 {default 4} +vim.opt.signcolumn = "yes" -- always show the sign column otherwise it would shift the text each time +vim.opt.wrap = false -- display lines as one long line +vim.opt.spell = false +vim.opt.spelllang = "en" +vim.opt.scrolloff = 8 -- is one of my fav +vim.opt.sidescrolloff = 8 +``` + diff --git a/i18n/it/docusaurus-plugin-content-docs/current/configuration/02-keybindings.md b/i18n/it/docusaurus-plugin-content-docs/current/configuration/02-keybindings.md new file mode 100644 index 00000000..804e3874 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/configuration/02-keybindings.md @@ -0,0 +1,178 @@ +# Keybindings + +## General Bindings + +There are three style options for settings keybindings. + +### Vim style + +Set bindings with vim.cmd. For more details read `:help vim.cmd` + +```lua +# Just take your vim keybindings and wrap them in vim.cmd +vim.cmd("nnoremap W :w") + +# Multiline Statements +vim.cmd([[ + map bb :!bundle install + map gdm :Git diff master + imap jj +]]) + +# Calling lua functions +vim.cmd("nnoremap gi lua vim.lsp.buf.implementation()") +``` + +### Neovim style + +Use the `vim.api.nvim_set_keymap` function. Arguments for the function are: (mode, keybind, command, options). For more details read `:help map-arguments` + +```lua +vim.api.nvim_set_keymap('n', '', ':set hlsearch!', { noremap = true, silent = true }) +-- Vim equivalent +-- :nnoremap :set hlsearch + +vim.api.nvim_set_keymap('n', 'tegf', [[lua require('telescope.builtin').git_files()]], { noremap = true, silent = true }) +-- Vim equivalent +-- :nnoremap tegf lua require('telescope.builtin').git_files() + +vim.api.nvim_buf_set_keymap(0, '', 'cc', 'line(".") == 1 ? "cc" : "ggcc"', { noremap = true, expr = true }) +-- Vim equivalent +-- :noremap cc line('.') == 1 ? 'cc' : 'ggcc' +``` + +### LunarVim keybindings + +Use `Lk` to view the keybindings set by Lunarvim. + +To modify a single Lunarvim keymapping + +```lua + -- X closes a buffer + lvim.keys.normal_mode[""] = ":BufferClose" +``` + +To remove keymappings set by Lunarvim + +```lua + -- use the default vim behavior for H and L + lvim.keys.normal_mode[""] = false + lvim.keys.normal_mode[""] = false + -- vim.opt.scrolloff = 0 -- Required so L moves to the last line +``` + +### Listing what is mapped + +Use `Lk` to view the keybindings set by Lunarvim. + +To see if a particular key has already been bound: + +```lua +:verbose map +``` + +- :nmap for normal mode mappings +- :vmap for visual mode mappings +- :imap for insert mode mappings + +Or just list every mapping + +```lua +:map +``` + +To output this to a searchable buffer + +```lua +:enew|pu=execute('map') +``` + +To view keybindings for the nvimtree plugin. Make sure you're in an nvimtree buffer and type `g?` to toggle the keybindings help + +## Whichkey Bindings + +To add or remap keybindings for whichkey use `lvim.builtin.which_key.mappings` + +### Single mapping + +Map a single key. + +```lua +lvim.builtin.which_key.mappings["P"] = { + "lua require'telescope'.extensions.project.project{}", "Projects" +} +``` + +Adding a key to a existing submenu. + +```lua +lvim.builtin.which_key.mappings["tP"] = { + "lua require'telescope'.extensions.project.project{}", "Projects" +} +``` + +### Submenu mapping + +Map a group of keys. `Definitions` would be triggered by pressing `td`. The name for this menu would appear as `Trouble`. + +```lua +lvim.builtin.which_key.mappings["t"] = { + name = "Trouble", + r = { "Trouble lsp_references", "References" }, + f = { "Trouble lsp_definitions", "Definitions" }, + d = { "Trouble lsp_document_diagnostics", "Diagnosticss" }, + q = { "Trouble quickfix", "QuickFix" }, + l = { "Trouble loclist", "LocationList" }, + w = { "Trouble lsp_workspace_diagnostics", "Diagnosticss" }, +} +``` + +### Replace all whichkey mappings + +To clear all whichkey bindings and replace all mappings with your own, use this form. + +```lua +lvim.builtin.which_key.mappings = { + ["c"] = { "BufferClose!", "Close Buffer" }, + ["e"] = { "lua require'core.nvimtree'.toggle_tree()", "Explorer" }, + ["h"] = { 'let @/=""', "No Highlight" }, + + p = { + name = "Packer", + c = { "PackerCompile", "Compile" }, + i = { "PackerInstall", "Install" }, + r = { "lua require('lv-utils').reload_lv_config()", "Reload" }, + s = { "PackerSync", "Sync" }, + u = { "PackerUpdate", "Update" }, + }, +} +``` + +### Example mappings + +Consult the [LunarVim configuration for whichkey](https://github.com/LunarVim/LunarVim/blob/rolling/lua/lvim/core/which-key.lua) to see more examples of how to map keys. + +## Leader Key + +The default leader key is `Space`. This can be changed with the following + +```lua +lvim.leader = "space" +``` + +## Cursor Movement + +By default, when pressing left/right cursor keys, Vim will not move to the previous/next line after reaching first/last character in the line. This can be quite annoying for new users. Fortunately this behaviour can be easily changed by putting this in your vimrc file: + +To enable: + +```lua +lvim.line_wrap_cursor_movement = true +``` + +Enabling maps the following command + +```vim +set whichwrap+=<,>,h,l,[,] +``` + diff --git a/i18n/it/docusaurus-plugin-content-docs/current/configuration/03-colorschemes.md b/i18n/it/docusaurus-plugin-content-docs/current/configuration/03-colorschemes.md new file mode 100644 index 00000000..ea1ab62b --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/configuration/03-colorschemes.md @@ -0,0 +1,44 @@ +# Colorscheme + +## Switching colors + +To switch color schemes on the fly, type the following command: + +```vim +:Telescope colorscheme +``` + +You can also press `Space` `s` `p` to cycle through colorschemes with a preview. + +To change the color scheme permanently, modify `config.lua` + +```lua +lvim.colorscheme = 'desert' +``` + +## Installing colorschemes + +You can add any colorscheme you like. Just add a plugin with the colorscheme of your choice. For more information on installing plugins [look here. ](../plugins/README.md) + +[This is a list](https://github.com/rockerBOO/awesome-neovim#colorscheme) of colorschemes with tree-sitter support + +## Transparent Windows + +If you're using transparent windows enable this setting + +```lua +lvim.transparent_window = true +``` + +That enables the following settings + +```lua +cmd "au ColorScheme * hi Normal ctermbg=none guibg=none" +cmd "au ColorScheme * hi SignColumn ctermbg=none guibg=none" +cmd "au ColorScheme * hi NormalNC ctermbg=none guibg=none" +cmd "au ColorScheme * hi MsgArea ctermbg=none guibg=none" +cmd "au ColorScheme * hi TelescopeBorder ctermbg=none guibg=none" +cmd "au ColorScheme * hi NvimTreeNormal ctermbg=none guibg=none" +cmd "let &fcs='eob: '" +``` + diff --git a/i18n/it/docusaurus-plugin-content-docs/current/configuration/04-nerd-fonts.md b/i18n/it/docusaurus-plugin-content-docs/current/configuration/04-nerd-fonts.md new file mode 100644 index 00000000..1bac027b --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/configuration/04-nerd-fonts.md @@ -0,0 +1,42 @@ +--- +title: Nerd Fonts +--- + +# [ Nerd Fonts ](https://www.nerdfonts.com/) + +From the repo: + +> "Nerd Fonts is a project that patches developer targeted fonts with a high number of glyphs (icons). Specifically to add a high number of extra glyphs from popular 'iconic fonts' such as Font Awesome ➶, Devicons ➶, Octicons ➶, and others." + +## Installing a font + +### Video Explanation + +[Installing fonts with included icon sets](https://www.youtube.com/watch?v=fR4ThXzhQYI&t=364s) + +### Easy Installer + +Visit [this repo](https://github.com/ronniedroid/getnf) for an easy way to install nerd fonts. + +### Manual Install + +1. Go to the [pached fonts directory](https://www.nerdfonts.com/font-downloads) +1. Copy the downloaded files to `~/.local/share/fonts` + +### Curl Download + +```bash +mkdir -p ~/.local/share/fonts +cd ~/.local/share/fonts && curl -fLo "Droid Sans Mono for Powerline Nerd Font Complete.otf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20Nerd%20Font%20Complete.otf +``` + +### TTF vs OTF + +OTF is a newer standard based on TTF, when given the option you should generally choose OTF. + +[ Here ](https://www.makeuseof.com/tag/otf-vs-ttf-fonts-one-better/) is good article explaining the difference. + +## Terminal settings + +After installing your font, you will have to refresh your font cache by doing `fc-cache -f -v`. Then you will have to change your terminal settings to use the font you just installed. Please refer to your terminal's documentation for changing the terminal font. + diff --git a/i18n/it/docusaurus-plugin-content-docs/current/configuration/05-autocommands.md b/i18n/it/docusaurus-plugin-content-docs/current/configuration/05-autocommands.md new file mode 100644 index 00000000..7570317c --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/configuration/05-autocommands.md @@ -0,0 +1,40 @@ +# Autocommands + +To set up autocommands use the native nvim api `vim.api.nvim_create_autocmd`, or use the helper Lunarvim table `lvim.autocommands` which will be passed to [define_autocmds()](https://github.com/LunarVim/lunarvim/blob/3475f7675d8928b49c85878dfc2912407de57342/lua/lvim/core/autocmds.lua#L177) automatically. +```lua +lvim.autocommands = { + "BufEnter", -- see `:h autocmd-events` + { -- this table is passed verbatim as `opts` to `nvim_create_autocmd` + pattern = { "*.json", "*.jsonc" }, -- see `:h autocmd-events` + command = "setlocal wrap", + } + }, +``` +This will run a command at a given event for the given filetype. + +An example using the nvim api could look like this: +```lua +vim.api.nvim_create_autocmd("BufEnter", { + pattern = { "*.json", "*.jsonc" }, + -- enable wrap mode for json files only + command = "setlocal wrap", +}) +``` +You can also add lua callbacks + +```lua +lvim.autocommands = { + { + "BufWinEnter", { + pattern = { "*.cpp", "*.hpp" }, + callback = function() + -- DYI editorconfig + if vim.loop.cwd() == "path/to/my/project" then + vim.cmd [[setlocal tabstop=8 shiftwidth=8]] + end + end + }, + } +} +``` + diff --git a/i18n/it/docusaurus-plugin-content-docs/current/configuration/06-statusline.md b/i18n/it/docusaurus-plugin-content-docs/current/configuration/06-statusline.md new file mode 100644 index 00000000..aa3147b1 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/configuration/06-statusline.md @@ -0,0 +1,143 @@ +# Statusline + +LunarVim uses `lualine` as a default statusline. + +Configuration is same as that of lualine with full support. See [Lualine README.md](https://github.com/nvim-lualine/lualine.nvim/blob/master/README.md) + +In addition, LunarVim provides predefined styles(layout) and components. + +## Style + +There are three style options LunarVim accepts, + +- lvim + > LunarVim's default layout +- default + > Lualine's default layout +- none + > Empty layout + +To set style other than `"lvim" style`, + +```lua +lvim.builtin.lualine.style = "default" -- or "none" +``` + +
+ +## Component + +You can use any component that `lualine` provides and `LunarVim` provides. + +**LunarVim's components** + +`mode`, `branch`, `filename`, `diff`, `python_env`, `diagnostics`, `treesitter`, `lsp`, `location`, `progress`, `spaces`, `encoding`, `filetype`, `scrollbar` + +To set `lualine's "diff"` component to section c of `"default" style`, + +```lua +lvim.builtin.lualine.style = "default" +lvim.builtin.lualine.sections.lualine_c = { "diff" } +``` + +To set `LunarVim's "spaces" and "location"` components to section y and `lualine's "mode"` component to section a of `"lvim" style`, + +```lua +-- no need to set style = "lvim" +local components = require("lvim.core.lualine.components") + +lvim.builtin.lualine.sections.lualine_a = { "mode" } +lvim.builtin.lualine.sections.lualine_y = { + components.spaces, + components.location +} +``` + +
+ +## Theme + +LunarVim automatically detects current colorscheme and set it as theme. + +To change your colorscheme, see [Colorscheme](./03-colorschemes.md) + +If there is no matching theme, it will fallback to `"auto"` theme provided by lualine. + +In case you want to use different theme, set it manually, + +```lua +lvim.builtin.lualine.options.theme = "gruvbox" +``` + +To customize existing theme, +```lua +local custom_gruvbox = require "lualine.themes.gruvbox_dark" +custom_gruvbox.insert.b = { fg = custom_gruvbox.insert.a.bg, gui = "bold" } +custom_gruvbox.visual.b = { fg = custom_gruvbox.visual.a.bg, gui = "bold" } +custom_gruvbox.replace.b = { fg = custom_gruvbox.replace.a.bg, gui = "bold" } +custom_gruvbox.command.b = { fg = custom_gruvbox.command.a.bg, gui = "bold" } + +lvim.builtin.lualine.options.theme = custom_gruvbox +``` + +To create your own theme, + +```lua +local colors = { + color2 = "#0f1419", + color3 = "#ffee99", + color4 = "#e6e1cf", + color5 = "#14191f", + color13 = "#b8cc52", + color10 = "#36a3d9", + color8 = "#f07178", + color9 = "#3e4b59", +} + +lvim.builtin.lualine.options.theme = { + normal = { + c = { fg = colors.color9, bg = colors.color2 }, + a = { fg = colors.color2, bg = colors.color10, gui = "bold" }, + b = { fg = colors.color4, bg = colors.color5 }, + }, + insert = { + a = { fg = colors.color2, bg = colors.color13, gui = "bold" }, + b = { fg = colors.color4, bg = colors.color5 }, + }, + visual = { + a = { fg = colors.color2, bg = colors.color3, gui = "bold" }, + b = { fg = colors.color4, bg = colors.color5 }, + }, + replace = { + a = { fg = colors.color2, bg = colors.color8, gui = "bold" }, + b = { fg = colors.color4, bg = colors.color5 }, + }, + inactive = { + c = { fg = colors.color4, bg = colors.color2 }, + a = { fg = colors.color4, bg = colors.color5, gui = "bold" }, + b = { fg = colors.color4, bg = colors.color5 }, + }, +} +``` + +
+ +## Callback + +Callback function is available for more flexibility. + +It will run when configuration is done, + +```lua +lvim.builtin.lualine.on_config_done = function(lualine) + local config = lualine.get_config() + local components = require "core.lualine.components" + + config.sections.lualine_x[3].color.bg = "#2c2c2c" + table.remove(config.sections.lualine_x, 2) -- remove treesitter icon + table.insert(config.sections.lualine_x, components.location) + lualine.setup(config) +end +``` + +If you want to go way beyond with configuration, check [jimcornmell's setup](https://github.com/jimcornmell/lvim/blob/main/lua/user/lualine.lua) as a reference. diff --git a/i18n/it/docusaurus-plugin-content-docs/current/configuration/07-ftplugin.md b/i18n/it/docusaurus-plugin-content-docs/current/configuration/07-ftplugin.md new file mode 100644 index 00000000..2aec73ec --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/configuration/07-ftplugin.md @@ -0,0 +1,15 @@ +# FTPlugin (filetype plugin) + +## Description + +From `:h ftplugin` + +> A filetype plugin is like a global plugin, except that it sets options and +> defines mappings for the current buffer only. + +Example for setting specific `shiftwidth` and `tabstop` that only apply for `C` file-types. + +```lua +-- create a file at $LUNARVIM_CONFIG_DIR/after/ftplugin/c.lua +vim.cmd("setlocal tabstop=4 shiftwidth=4") +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/configuration/08-custom-snippets.md b/i18n/it/docusaurus-plugin-content-docs/current/configuration/08-custom-snippets.md new file mode 100644 index 00000000..5ac04e8a --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/configuration/08-custom-snippets.md @@ -0,0 +1,69 @@ +# Custom snippets + +## Description + +You can add your own snippets to LunarVim. + +Custom snippets can be defined as json or lua. + +### json version + +First create a folder : `~/.config/lvim/snippets/` next to your `config.lua` + +Then in there you need at least 2 files. + +The first file describes where your snippets are : + +`package.json` : + +```json +{ + "name": "nvim-snippets", + "author": "authorname", + "engines": { + "vscode": "^1.11.0" + }, + "contributes": { + "snippets": [ + { + "language": "python", + "path": "./python.json" + } + ] + } +} +``` + +For each language, create a file like this : + +`python.json` : + +```json +{ + "hello": { + "prefix": "hello", + "body": [ + "print('Hello, World!')" + ], + "description": "print Hello, World!" + } +} +``` + +You should be able to expand `hello` into `print("Hello, World!")` + +### lua version + +First create a folder named `luasnippets` next to your `config.lua`. For example `~/.config/lvim/luasnippets/` + +Then, inside that folder, create a lua file named with the filetype you want to create snippets for. For example, for creating snippets for lua, create a (redundant, but correct) file named `lua.lua`. Then you put your files there like this: + +```lua +return { + s("foo", { t "Expands to bar" }), +} +``` +LuaSnip is able to hot-reload snippets defined in lua when you save them, but you may need to restart LunarVim the first time you create the snippet files. +Please note that LuaSnip injects a bunch of utility globals when it loads your snippets (in this example the `s` and `t` functions), so you don't need to care about requiring or defining them. To get more detailed information and examples please read the [LuaSnip docs about this topic](https://github.com/L3MON4D3/LuaSnip/blob/master/DOC.md#lua) + +### TODO: snipmate version diff --git a/i18n/it/docusaurus-plugin-content-docs/current/configuration/README.md b/i18n/it/docusaurus-plugin-content-docs/current/configuration/README.md new file mode 100644 index 00000000..7bb75ebd --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/configuration/README.md @@ -0,0 +1,31 @@ +# Configuration + +You can configure LunarVim by using the configuration file located in `~/.config/lvim/config.lua`. + +To get started quickly, copy the sample configuration file + +```bash +cp ~/.local/share/lunarvim/lvim/utils/installer/config.example.lua ~/.config/lvim/config.lua +``` + +Many LunarVim internal settings are exposed through the `lvim` global object. +To see a list of all available settings, run this command from either `~/.config/lvim/` or `~/.local/share/lunarvim/lvim` to generate an lv-settings.lua file. + +```bash +lvim --headless +'lua require("lvim.utils").generate_settings()' +qa && sort -o lv-settings.lua{,} +``` + +Here is a sample of the output. + +```lua +lvim.builtin.telescope.defaults.initial_mode = "insert" +lvim.builtin.telescope.defaults.layout_config.horizontal.mirror = false +lvim.builtin.telescope.defaults.layout_config.preview_cutoff = 120 +lvim.builtin.telescope.defaults.layout_config.prompt_position = "bottom" +lvim.builtin.telescope.defaults.layout_config.vertical.mirror = false +lvim.builtin.telescope.defaults.layout_config.width = 0.75 +lvim.builtin.telescope.defaults.layout_strategy = "horizontal" +``` + +If you want to keep launching LunarVim with the nvim command, add an alias entry to your shell's config file: `alias nvim=lvim`. To temporarily revert to the default nvim prefix it with a backslash `\nvim`. If you create this alias, you may also want to explicitly set your editor as well `export EDITOR='lvim'`. This will tell command line tools like git to use LunarVim as your editor. + diff --git a/i18n/it/docusaurus-plugin-content-docs/current/configuration/_category_.json b/i18n/it/docusaurus-plugin-content-docs/current/configuration/_category_.json new file mode 100644 index 00000000..484e2553 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/configuration/_category_.json @@ -0,0 +1,3 @@ +{ + "position": 4 +} diff --git a/i18n/it/docusaurus-plugin-content-docs/current/dev/02-under-the-hood.md b/i18n/it/docusaurus-plugin-content-docs/current/dev/02-under-the-hood.md new file mode 100644 index 00000000..062913d5 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/dev/02-under-the-hood.md @@ -0,0 +1,74 @@ +# Under the Hood + +# Logic from start to window load + +![LunarVim initialization flowchart](./lunarvim_initialization.png "LunarVim initialization flowchart") + +The above chart was made with the following markdown using mermaid markdown +Last updated Wed Aug 4 10:04:27 PM CEST 2021 + +```mermaid +graph TD + rtp[Set runtime path] --> config_check[Ensure user config exists] + config_check -- lv-config.lua --> print_rename_message["Print a message asking user to rename file"] + config_check -- config.lua --> load_defaults[Load default_config] + print_rename_message --> load_defaults + load_defaults --> load_lvim[Load lvim globals: builtin, lsp, diagnostics, misc] + load_lvim --> load_lsp[Load lsp file] + load_lsp --> load_common_on_attach( Load common_on_attach for use in lang configuration ) + load_common_on_attach --> load_common_capabilities( Load common_capabilities for use in lang configuration) + load_common_capabilities --> load_common_on_init( Set common_on_init for use in lang configuration ) + load_common_on_init --> load_json[Load Json schemas] + load_json --> load_lang[Load lvim globals: lang] + load_lang --> load_keymappings[Load Keymappings data but don't set Keymappings] + load_keymappings --> load_builtin_configs[Load configuration for builtin plugins] + load_builtin_configs --> load_autocommands[Load autocommands but don't set them] + load_autocommands --> set_default_options( Set the default options for the neovim editor ) + set_default_options --> load_user_config[Load user configuration file] + load_user_config -- status ok --> set_nvim_settings[Set neovim settings] + load_user_config -- status fail --> print_user_config_error["Print something is wrong with your config"] + print_user_config_error --> set_nvim_settings + set_nvim_settings --> define_autogroups[Define autogroups] + define_autogroups --> setup_plugins[Setup Plugins] + setup_plugins --> plugin_callback_check["Is there a callback set for lvim.builtin.?"] + plugin_callback_check -- Yes --> plugin_callback["Call the callback for the plugin"] + plugin_callback_check -- No --> colorscheme[Set the colorscheme] + plugin_callback --> colorscheme + colorscheme --> autoformat[Is format on save enabled?] + autoformat -- yes --> autoformat_active[Set an autocommand to enable autoformatting] + autoformat -- no --> autoformat_disabled[Look for an autoformat autocommand and remove it if it exists] + autoformat_active --> core_commands[Load core.commands: QuickFixToggle] + autoformat_disabled --> core_commands + core_commands --> lsp_handlers["Set up lsp handlers: publishDiagnostics, hover, signatureHelp"] + lsp_handlers --> null-ls["Add null-ls as a language server in lspconfig"] + null-ls --> nlsp["Set up NlspSettings"] + nlsp --> set_keymappings["Apply default keymappings"] + set_keymappings --> override_keymaps["Append to default keymappings"] + override_keymaps --> setup_common_on_init["Setup common_on_init"] + setup_common_on_init --> common_on_init_callback_check["Does a common on init callback exist?"] + common_on_init_callback_check -- Yes --> common_on_init_callback["Call the callback"] + common_on_init_callback_check -- No --> check_for_formatters["Check if formatters are explicitly set"] + common_on_init_callback --> check_for_formatters + check_for_formatters -- Yes --> turn_off_lsp_formatting["Turn off resolved_capabilities.document_formatting"] + turn_off_lsp_formatting --> setup_common_on_attach["Setup common on attach"] + setup_common_on_attach -- Has an lsp.on_attach_callback --> call_lsp_on_attach_callback["Call lsp on_attach callback"] + check_for_formatters -- No --> setup_common_on_attach + setup_common_on_attach -- No callback defined --> smart_cwd_check["Is lvim.lsp.smart_cwd set to true?"] + smart_cwd_check -- True --> query_lsp_for_cwd["Use root directory from LSP"] + smart_cwd_check -- False --> setup_null_ls["Setup null-ls formatters and linters"] + setup_null_ls --> validate_provider_request["Does a valid provider exist?"] + query_lsp_for_cwd --> setup_null_ls + call_lsp_on_attach_callback --> smart_cwd_check + validate_provider_request -- nil or empty provider --> lsp_setup["Setup LSP"] + validate_provider_request -- Executable exists --> is_provider_eslint["Is provider eslint?"] + is_provider_eslint -- Yes --> replace_with_eslintd["Replace it with eslint_d"] + replace_with_eslintd --> add_provider_to_table["Add it to the provider to a table"] + is_provider_eslint -- No --> add_provider_to_table + validate_provider_request -- Executable does not exist --> print_provider_error["Print error about not being able to find formatting executable"] + add_provider_to_table --> lsp_setup + print_provider_error --> lsp_setup + lsp_setup --> lsp_override_check["Is there an lvim.lsp.automatic_configuration.skipped_servers set?"] + lsp_override_check -- Yes --> lsp_override["Use the override table"] + lsp_override_check -- No --> first_window_load["First window loads"] + lsp_override --> first_window_load +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/dev/README.md b/i18n/it/docusaurus-plugin-content-docs/current/dev/README.md new file mode 100644 index 00000000..e357d73a --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/dev/README.md @@ -0,0 +1,84 @@ +# Development of Lunarvim + +## Getting started + +We recommend setting up a symlink to your fork: + +```bash +cd ~/.local/share/lunarvim/ +ln -s ~/dev/Lunarvim ~/.local/share/lunarvim/lvim_dev +``` + +Your output should be something like: + +```bash +$ ls -a +lrwxrwxrwx 1 user user 37 sep 23 14:35 lvim_dev -> /home/user/dev/LunarVim +``` + +--- + +Now switch your lvim to the development setup: + +```bash +cd ~/.local/share/lunarvim/ +mv lvim lvim_back +mv lvim_dev lvim +``` + +--- + +Going back to lvim + +```bash +cd ~/.local/share/lunarvim/ +mv lvim lvim_dev +mv lvim_back lvim +``` + +To test that you can get some output from `lvim` add the following to your `init.lua` file in your fork. + +```lua +print ("it works") +``` + +```bash +lvim +``` + +Now type `:messages`. Happy contributing! + +## Lua + Neovim = :heart: + +To get started, [this guide](https://github.com/nanotee/nvim-lua-guide) covers many points that will get you going with Lua and how Neovim works. + +## Official Documentation + +The [reference manual](https://www.lua.org/manual/5.4/) is the official definition of the Lua language. + +If you don't know about it, [DevDocs](https://devdocs.io/lua~5.4/) combines multiple API documentations in a fast, organized, and searchable interface. + +## Neovim Documentation + +Neovim provides a [standard library](https://neovim.io/doc/user/lua.html) which you should know about. + +It provides many functions that you wish were implemented in Lua's stdlib, for instance `strings.split`. + +It also comes with a [LSP framework](https://neovim.io/doc/user/lsp.html) and [much more](https://neovim.io/doc/user/). + +## Style Guide + +LuaRock [style guide](https://github.com/luarocks/lua-style-guide) is a complete work that deserves a look if you want learn how to write consistent and robust code. + +It is based on many pre-existing guides, provides rationals for all their decisions, and worked successfully in a long-running project. + +## Code Quality + +To ensure code quality and a consistent style, our [CI](https://github.com/Lunarvim/LunarVim/actions) uses the following tools: + +- Lua: + - [Stylua](https://github.com/JohnnyMorganz/StyLua). An opinionated Lua code formatter. + - [Luacheck](https://github.com/mpeterv/luacheck). A tool for linting and static analysis of Lua code. +- Shell + - [Shfmt](https://github.com/mvdan/sh). A shell parser, formatter, and interpreter with bash support. + - [Shellcheck](https://github.com/koalaman/shellcheck). A static analysis tool for shell scripts. diff --git a/i18n/it/docusaurus-plugin-content-docs/current/dev/_category_.json b/i18n/it/docusaurus-plugin-content-docs/current/dev/_category_.json new file mode 100644 index 00000000..98231d78 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/dev/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "For Developers", + "position": 7 +} diff --git a/i18n/it/docusaurus-plugin-content-docs/current/dev/lunarvim_initialization.png b/i18n/it/docusaurus-plugin-content-docs/current/dev/lunarvim_initialization.png new file mode 100644 index 00000000..6427ab17 Binary files /dev/null and b/i18n/it/docusaurus-plugin-content-docs/current/dev/lunarvim_initialization.png differ diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/HCL.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/HCL.md new file mode 100644 index 00000000..9ea2ccef --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/HCL.md @@ -0,0 +1,15 @@ +# HCL + +## Syntax highlighting + +First, within LunarVim run the following: + +```vim +:TSInstall hcl +``` +## Supported language servers + +(TODO) + +## Supported formatters +(TODO) diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/README.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/README.md new file mode 100644 index 00000000..38996c5b --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/README.md @@ -0,0 +1,313 @@ +# Overview + +LunarVim strives to have support for all major languages. This is made possible by utilizing some of the great plugins in Neovim's ecosystem. Such plugins are [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig), for LSP support, and [Null-ls](https://github.com/jose-elias-alvarez/null-ls.nvim) to provide support for handling external formatters, such as [prettier](https://github.com/prettier/prettier) and [eslint](https://github.com/eslint/eslint). Furthermore, LunarVim integrates with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) to provide rich syntax highlighting and other language parsing magic. + +If your language is not supported please check the following links and file a ticket so we can + +- Check if LSP support is available in the lspconfig [repo](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md) +- Check if your linter or formatter is available in the null-ls [repo](https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md) +- Check if your syntax is supported in the treesitter [repo](https://github.com/nvim-treesitter/nvim-treesitter) + +## At a glance + +You can use the following commands to check some information about any language servers that you have configured. + +- `:LvimInfo` + + - Contains information about all the servers attached to the buffer you are editing and their current capabilities, such as formatting and go-to definition support. It also includes information related to any linters and formatters that are, or can be, configured. + - keybind: `Li` + +- `:LspInfo` + + - Contains basic information about all the servers that are running. + - keybind: `li` + +- `:LspInstallInfo` + + - Contains information about all the servers that you can manage with [nvim-lsp-installer](https://github.com/williamboman/nvim-lsp-installer). + - keybind: `lI` + +## LSP support + +### Installing and updating a server + +#### Automatic server installation + +By default, most supported language servers will get automatically installed once you open the supported file-type, e.g, opening a Python file for the first time will install `Pyright` and configure it automatically for you. + +- configuration option + +```lua +lvim.lsp.automatic_servers_installation = true +``` + +Please refer to [nvim-lsp-installer](https://github.com/williamboman/nvim-lsp-installer) to see the updated full list of currently available servers. + +To install a supported language server: + +```md +:LspInstall `` +``` + +You can also toggle `<:LspInstallInfo>` and interactively choose which servers to install. + +### Server override + +`lvim.lsp.automatic_configuration.skipped_servers` contains a list of servers that will **not** be automatically configured by default, for example only `tsserver` is allowed for JS-family languages, and when a language has more than one server available, then the most popular one is usually chosen. + +::: tip Notice +Overriding a server will completely bypass the lsp-installer, so you would have to manage the installation for any of those servers manually. +::: + +See the current list + +```lua +:lua print(vim.inspect(lvim.lsp.automatic_configuration.skipped_servers)) +``` + +See the default list + +```lua +:lua print(vim.inspect(lvim.lsp.automatic_configuration.skipped_servers)) +``` + +::: tip Notice +Any changes to `lvim.lsp.automatic_configuration.skipped_servers` **must** be followed by `:LvimCacheReset` to take effect. +::: + +### Server setup + +LunarVim uses [filetype plugins](../configuration/07-ftplugin.md) to enable lazy-loading the setup of a language server. A template generator is used to create `ftplugin` files and populate them with the setup call. + +- configuration option + +```lua +lvim.lsp.templates_dir = join_paths(get_runtime_dir(), "after", "ftplugin") +``` + +A typical setup call with default arguments + +```lua +-- edit this file by running `:lua vim.cmd("edit " .. lvim.lsp.templates_dir .. "/lua.lua")` +require("lvim.lsp.manager").setup("sumneko_lua") +``` + +::: tip +You can quickly find these files by running `Lf` -> "Find LunarVim Files" +::: + +#### Overriding the default setup options + +Add the server you wish to configure manually to `lvim.lsp.automatic_configuration.skipped_servers`. + +```lua +vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "pyright" }) +``` + +Now you can set it up manually using the builtin [lsp-manager](https://github.com/LunarVim/LunarVim/blob/rolling/lua/lvim/lsp/manager.lua) + +```lua +--- list of options that should take predence over any of LunarVim's defaults +--- check the lspconfig documentation for a list of all possible options +local opts = {} +require("lvim.lsp.manager").setup("pyright", opts) +``` + +Alternatively, set it up using the `lspconfig` API directly + +```lua +--- check the lspconfig documentation for a list of all possible options +local opts = {} +require("lspconfig")["pyright"].setup(opts) +``` + +### Server settings + +To set a setting for your language server: + +```vim +:LspSettings +:LspSettings +``` + +This will create a file in `$LUNARVIM_CONFIG_DIR/lsp-settings`, to enable persistent changes. Refer to the documentation of [nlsp-settings](https://github.com/tamago324/nlsp-settings.nvim/blob/main/schemas/README.md) for a full updated list of supported language servers. + +::: tip +Make sure to install `jsonls` for autocompletion. +::: + +## Linting/Formatting + +Set a linter/formatter, this will override the language server formatting capabilities (if it exists) + +```lua +local formatters = require "lvim.lsp.null-ls.formatters" +formatters.setup { + { command = "black" }, + { + command = "prettier", + args = { "--print-width", "100" }, + filetypes = { "typescript", "typescriptreact" }, + }, +} + +local linters = require "lvim.lsp.null-ls.linters" +linters.setup { + { command = "flake8" }, + { + command = "shellcheck", + args = { "--severity", "warning" }, + }, + { + command = "codespell", + filetypes = { "javascript", "python" }, + }, +} + +local code_actions = require "lvim.lsp.null-ls.code_actions" +code_actions.setup { + { + command = "proselint" + }, +} +``` + +Another method is to reference the linter/formatter/code_actions by their names, as referenced in [null-ls docs](https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md), if you do not want to customize the command + +```lua +local formatters = require "lvim.lsp.null-ls.formatters" +formatters.setup { + { name = "black" }, +} + +local linters = require "lvim.lsp.null-ls.linters" +linters.setup { + { name = "flake8" }, + { name = "shellcheck" }, + { + name = "codespell", + filetypes = { "javascript", "python" }, + }, +} + +local code_actions = require "lvim.lsp.null-ls.code_actions" +code_actions.setup { + { + name = "proselint" + }, +} +``` + +This will lookup the provided name in the builtin configurations of `null_ls` and apply them. It can be considered equivalent to `null_ls.builtins.diagnostics.{name}`/`null_ls.builtins.formatting.{name}`/`null_ls.builtins.code_actions.{name}` + +_Note: Formatters' or Linters' or Code Actions installation is not managed by LunarVim. Refer to the each tool's respective manual for installation steps._ + +### Custom arguments + +It's also possible to add custom arguments for each linter/formatter/code_actions. + +```lua +local formatters = require "lvim.lsp.null-ls.formatters" +formatters.setup { + { + command = "prettier", + ---@usage arguments to pass to the formatter + -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}` + args = { "--print-width", "100" }, + }, +} + +local linters = require "lvim.lsp.null-ls.linters" +linters.setup { + { + command = "shellcheck", + ---@usage arguments to pass to the formatter + -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}` + args = { "--severity", "warning" }, + }, +} + +local code_actions = require "lvim.lsp.null-ls.code_actions" +code_actions.setup { + { + command = "proselint", + args = { "--json" }, + }, +} +``` + +_Note: remember that arguments cannot contains spaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}`._ + +### Multi languages per linter/formatter + +By default a formatter will attach to all the filetypes it supports. + +```lua +local formatters = require "lvim.lsp.null-ls.formatters" +formatters.setup { + { + command = "prettier", + ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports. + filetypes = { "typescript", "typescriptreact" }, + }, +} +``` + +_Note: removing the `filetypes` argument will allow the formatter to attach to all the default filetypes it supports._ + +### Multi linters/formatters/code_actions per language + +There are no restrictions on setting up multiple formatters per language + +```lua +local formatters = require "lvim.lsp.null-ls.formatters" +formatters.setup { + { + { command = "black", filetypes = { "python" } }, + { command = "isort", filetypes = { "python" } }, + }, +} + +local linters = require "lvim.lsp.null-ls.linters" +linters.setup { + { + command = "codespell", + ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports. + filetypes = { "javascript", "python" }, + }, +} + +local code_actions = require "lvim.lsp.null-ls.code_actions" +code_actions.setup { + { + command = "proselint", + args = { "--json" }, + filetypes = { "markdown", "tex" }, + }, +} +``` + +### Lazy-loading the linter/formatter/code_actions setup + +By default, all null-ls providers are checked on startup. If you want to avoid that or want to only set up the provider when you opening the associated file-type, +then you can use [filetype plugins](../configuration/07-ftplugin.md) for this purpose. + +Let's take `python` as an example: + +1. create a file called `python.lua` in the `$LUNARVIM_CONFIG_DIR/after/ftplugin` folder +2. add the following snippet + +```lua +local linters = require "lvim.lsp.null-ls.linters" +linters.setup({{command = "flake8", filetypes = { "python" } }}) +``` + +### Formatting on save + +You can disable auto-command and is to true by default. + +- configuration option + +```lua +lvim.format_on_save = true +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/Terraform.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/Terraform.md new file mode 100644 index 00000000..621666bc --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/Terraform.md @@ -0,0 +1,30 @@ +# Terraform + +## Syntax highlighting + + +First, within LunarVim run the following: + +```vim +:TSInstall hcl +``` + +To enable Syntax Highlighting for `.tf` files as well, just add this to your `config.lua`: +```lua +local parser_configs = require("nvim-treesitter.parsers").get_parser_configs() +parser_configs.hcl = { + filetype = "hcl", "terraform", +} +``` + +## Supported language servers + +```lua +terraform = { "terraform", "terraformls"}, +``` + +## Supported formatters + +```lua +terraform = { "terraform"} } +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/_category_.json b/i18n/it/docusaurus-plugin-content-docs/current/languages/_category_.json new file mode 100644 index 00000000..6b13ae71 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Languages", + "position": 5 +} diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/c_cpp.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/c_cpp.md new file mode 100644 index 00000000..52020007 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/c_cpp.md @@ -0,0 +1,118 @@ +# C/C++ + +## Install Syntax Highlighting + +```vim +:TSInstall c +``` + +```vim +:TSInstall cpp +``` + +## Install Language Server + +You can install `clangd` language server using the [nvim-lsp-installer](https://github.com/williamboman/nvim-lsp-installer) + +```vim +:LspInstall clangd +``` + +Check the official documentation for other methods . + +## Formatters + +`clangd` language server supports formatting using `clang_format` by default. Optionally, you can use `uncrustify` or `clang-format` directly if you don't want to use `clangd`. + +Configuration in `~/.config/lvim/config.lua` + +```lua +local formatters = require "lvim.lsp.null-ls.formatters" +formatters.setup { { exe = "uncrustify", args = {} } } +``` + +The selected formatter must be installed separately. + +## LSP Settings + +If you need specific settings for `clangd` then you can override it like this + +```lua +-- check the full default list `:lua print(vim.inspect(lvim.lsp.automatic_configuration.set_keymappings))` +vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "clangd" }) +``` + +Now you can customize the setup completely + +```lua +-- some settings can only passed as commandline flags `clangd --help` +local clangd_flags = { + "--all-scopes-completion", + "--suggest-missing-includes", + "--background-index", + "--pch-storage=disk", + "--cross-file-rename", + "--log=info", + "--completion-style=detailed", + "--enable-config", -- clangd 11+ supports reading from .clangd configuration file + "--clang-tidy", + -- "--clang-tidy-checks=-*,llvm-*,clang-analyzer-*,modernize-*,-modernize-use-trailing-return-type", + -- "--fallback-style=Google", + -- "--header-insertion=never", + -- "--query-driver=" +} + +local clangd_bin = "clangd" + +local custom_on_attach = function(client, bufnr) + require("lvim.lsp").common_on_attach(client, bufnr) + local opts = { noremap = true, silent = true } + vim.api.nvim_buf_set_keymap(bufnr, "n", "lh", "ClangdSwitchSourceHeader", opts) +end + +local opts = { + cmd = { clangd_bin, unpack(clangd_flags) }, + on_attach = custom_on_attach, +} + +require("lvim.lsp.manager").setup("clangd", opts) +``` + +Refer to the official documentation if you face any issues . + +## Debugger + +```vim +:DIInstall ccppr_vsc +``` + +To enable pretty-printing, create a custom configuration: + +```lua +-- ~/.config/lvim/ftplugin/cpp.lua +local dap_install = require "dap-install" +dap_install.config("ccppr_vsc", { + adapters = { + type = "executable", + }, + configurations = { + { + type = "cpptools", + request = "launch", + name = "Launch with pretty-print", + program = function() + return vim.fn.input('Path to exe: ', vim.fn.getcwd() .. '/', 'file') + end, + cwd = "${workspaceFolder}", + stopOnEntry = true, + setupCommands = { + { + description = "Enable pretty-printing", + text = "-enable-pretty-printing", + } + } + }, + } +}) + +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/csharp.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/csharp.md new file mode 100644 index 00000000..0dc13bf1 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/csharp.md @@ -0,0 +1,19 @@ +# C# (csharp) + +## Install Syntax Highlighting + +```vim +:TSInstall c_sharp +``` + +## Install Language Server + +```vim +:LspInstall c# +``` + +## Formatters + +The csharp language server OmniSharp supports formatting. Formatting is automatically enabled by installing the csharp language server. The formatting options can be changed by with the [OmniSharp configuration options](https://github.com/OmniSharp/omnisharp-roslyn/wiki/Configuration-Options). + +[clang-format](https://www.electronjs.org/docs/development/clang-format) can optionally be used as a C# formatter. After installing the `clang-format` the formatter is enabled with configuration. OmniSharp formatter is then automatically disabled. diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/go.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/go.md new file mode 100644 index 00000000..bf6454cb --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/go.md @@ -0,0 +1,92 @@ +# Go + +## Install Syntax Highlighting + +```vim +:TSInstall go +``` + +## Supported language servers + +```lua +go = { "gopls" } +``` + +## Supported formatters + +```lua +go = { "gofmt", "gofumpt", "goimports", "golines" } +``` + +## LSP Settings + +```vim +:LspSettings gopls +``` + +Configure `json` to use auto-completion + +## Debugger + +```vim +:DIInstall go_delve +``` + +Using delve directly: + +```lua +-- ~/.config/lvim/ftplugin/go.lua +local dap_install = require "dap-install" +dap_install.config("go_delve", {}) +``` + +Using the [vscode-go debug adapter](https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation#go): + +```lua +local dap = require "dap" +dap.adapters.go = { + type = 'executable'; + command = 'node'; + args = {os.getenv('HOME') .. '/vscode-go/dist/debugAdapter.js'}; -- specify the path to the adapter +} +dap.configurations.go = { + { + type = "go", + name = "Attach", + request = "attach", + processId = require("dap.utils").pick_process, + program = "${workspaceFolder}", + dlvToolPath = vim.fn.exepath('dlv') + }, + { + type = "go", + name = "Debug curr file", + request = "launch", + program = "${file}", + dlvToolPath = vim.fn.exepath('dlv') + }, + { + type = "go", + name = "Debug", + request = "launch", + program = "${workspaceFolder}", + dlvToolPath = vim.fn.exepath('dlv') + }, + { + type = "go", + name = "Debug curr test", + request = "launch", + mode = "test", + program = "${file}", + dlvToolPath = vim.fn.exepath('dlv') + }, + { + type = "go", + name = "Debug test", + request = "launch", + mode = "test", + program = "${workspaceFolder}", + dlvToolPath = vim.fn.exepath('dlv') + }, +} +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/java.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/java.md new file mode 100644 index 00000000..1736b661 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/java.md @@ -0,0 +1,52 @@ +# Java + +## Install Syntax Highlighting + +```vim +:TSInstall java +``` + +## Supported language servers + +```lua +java = { "jdtls" } +``` + +NOTE: jdtls requires jdk-11 or newer to run. + +## Supported formatters + +```lua +java = { "clang-format", "uncrustify" } +``` + +## LSP Settings + +```lua +:LspSettings jdtls +``` +This will generate the `jdtls.json` file where you can change the settings, the example document has this structure, but is too large to put it all here +```json +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "This is onyl an example, the full document has mora than 700 lines", + "properties": { + "java.autobuild.enabled": { + "default": true, + "description": "Go to the original document, this is just an example", + "scope": "window", + "type": "boolean" + }, + "java.codeGeneration.generateComments": { + "default": false, + "description": "Go to the original document, this is just an example", + "scope": "window", + "type": "boolean" + }, + } +``` +You can find the full document at nlsp-settings [generated schema](https://github.com/tamago324/nlsp-settings.nvim/blob/main/schemas/_generated/jdtls.json) + +## Debugger + +(TODO) diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/javascript.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/javascript.md new file mode 100644 index 00000000..d491519f --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/javascript.md @@ -0,0 +1,45 @@ +# JavaScript + +## Syntax highlighting + +```vim +:TSInstall javascript +``` + +## Supported language servers + +```lua +javascript = { + "denols", "ember", "eslint", "eslintls", "rome", "stylelint_lsp", "tailwindcss", "tsserver" + } +``` + +Only `tsserver` is enabled by default and the other servers need to be [manually configured](./README.md#manually-configured-servers). + +### JavaScript standalone server (tsserver) + +`tsserver` requires one of the following files/folders : `package.json`, [`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html), [`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) or `.git.` in the root directory of the project + +See [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tsserver) for more information about the tsserver language server configuration options. + +## Supported formatters + +```lua +javascript = { "deno", "eslint", "eslint_d", "prettier", "prettier_d_slim", "prettierd", "rustywind" } +``` + +The configured formatter(s) must be installed separately. + +## Supported linters + +```lua +javascript = { "eslint", "eslint_d" } +``` + +The configured linter(s) must be installed separately. + +## Supported language servers + +```lua +javascript = { "denols", "ember", "eslint", "eslintls", "rome", "stylelint_lsp", "tailwindcss", "tsserver" } +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/json.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/json.md new file mode 100644 index 00000000..9b827615 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/json.md @@ -0,0 +1,19 @@ +# JSON + +## Install Syntax Highlighting + +```vim +:TSInstall json +``` + +## Supported language servers + +```lua +json = { "jsonls", "rome" } +``` + +## Supported formatters + +```lua +json = { "fixjson", "prettier", "prettier_d_slim", "prettierd", "python" } +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/julia.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/julia.md new file mode 100644 index 00000000..d94f8f2a --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/julia.md @@ -0,0 +1,53 @@ +# Julia + +## Install Syntax Highlighting + +```vim +:TSInstall julia +``` + +## Install Language Server + +The Juila language server, LanguageServer.jl, needs to be manually installed. +To install LanguageServer.jl in the location where [nvim-lspconfig +expects](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#julials) +run the following terminal command: + +```bash +julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.add("LanguageServer")' +``` + +Create the file `~/.config/lvim/ftplugin/julia.lua` with the following line to +start the language server when opening Julia files. + +```lua +local opts = {} +-- re-use common lsp configurations (keybindings, buffer-highlight and cmp integration) +opts = require("lvim.lsp").get_common_opts() +require('lspconfig').julials.setup(opts) +``` + +## Supporting Plugins + +For Latex-to-Unicode substitutions, block-wise movements, and other niceties for +writing Julia, install the [julia-vim +](https://github.com/JuliaEditorSupport/julia-vim) plugin. + +## Pro Tip + +To leverage the +[edit](https://docs.julialang.org/en/v1/stdlib/InteractiveUtils/#InteractiveUtils.edit-Tuple{Any}) +functionality with LunarVim use the +[define_editor](https://docs.julialang.org/en/v1/stdlib/InteractiveUtils/#InteractiveUtils.define_editor) +method in `~/.julia/config/startup.jl` + +```julia +using InteractiveUtils + +ENV["JULIA_EDITOR"] = "lvim" + +InteractiveUtils.define_editor( + r"lvim", wait=true) do cmd, path, line + `$cmd +$line $path` +end +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/lua.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/lua.md new file mode 100644 index 00000000..1065e489 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/lua.md @@ -0,0 +1,25 @@ +# Lua + +## Install Syntax Highlighting + +```vim +:TSInstall lua +``` + +## Supported language servers + +```lua +lua = { "sumneko_lua" } +``` + +## Supported formatters + +```lua +lua = { "lua-format", "stylua" } +``` + +## Supported linters + +```lua +lua = { "luacheck", "selene" } +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/powershell.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/powershell.md new file mode 100644 index 00000000..c308b4f9 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/powershell.md @@ -0,0 +1,35 @@ +# PowerShell + +## Install Syntax Highlighting + +Currently there is no maintained PowerShell parser available. If needed, configure a unmaintained parser by adding the following code to e.g. `config.lua` + +```lua +local parser_config = require("nvim-treesitter.parsers").get_parser_configs() +parser_config.powershell = { + install_info = { + url = "https://github.com/jrsconfitto/tree-sitter-powershell", + files = {"src/parser.c"} + }, + filetype = "ps1", + used_by = { "psm1", "psd1", "pssc", "psxml", "cdxml" } +} +``` + +Install the configured parser. + +```lua +:TSInstall powershell +``` + +## Supported language servers + +```lua +ps1 = { "powershell_es" }, +``` + +For more information about the language server configuration, refer to [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#powershell_es) + +## Formatters + +Formatting is supported by the PowerShell ES language server without additional configuration. diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/python.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/python.md new file mode 100644 index 00000000..d344d86d --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/python.md @@ -0,0 +1,43 @@ +# Python + +## Install Syntax Highlighting + +```vim +:TSInstall python +``` + +## Supported language servers + +```lua +python = { "jedi_language_server", "pylsp", "pyright" } +``` + +## Supported formatters + +```lua +python = { "autopep8", "black", "isort", "reorder-python-imports", "yapf" } +``` + +## Supported linters + +```lua +python = { "flake8", "pylint" } +``` + +## LSP Settings + +```vim +:LspSettings pyright +``` + +## Debugger + +```vim +:DIInstall python +``` + +```lua +-- ~/.config/lvim/ftplugin/python.lua +local dap_install = require "dap-install" +dap_install.config("python", {}) +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/qml.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/qml.md new file mode 100644 index 00000000..a65741b8 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/qml.md @@ -0,0 +1,35 @@ +# QML + +## Install Syntax Highlighting + +There is no official Treesitter support for QML, so instead you could use [the +plugin](https://github.com/peterhoeg/vim-qml): + +```lua +{ + "peterhoeg/vim-qml", + event = "BufRead", + ft = { "qml" }, +}, +``` + +## Supported language servers + +Currently QML does not have an official LSP, but its development is currently +[in progress](https://bugreports.qt.io/browse/QTBUG-68406). + +## Supported formatters + +```lua +qml = { "qmlformat" } +``` + +## Supported linters + +```lua +qml = { "qmllint" } +``` + +## See also + +- [C/C++ Configuration](c_cpp.md) diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/ruby.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/ruby.md new file mode 100644 index 00000000..06e75cf8 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/ruby.md @@ -0,0 +1,31 @@ +# Ruby + +### Install Syntax Highlighting + +```vim +:TSInstall ruby +``` + +## Supported language servers + +```lua +ruby = { "solargraph" } +``` + +### Solargraph + +Project root is recognized by having one of the following files/folders in the root directory of the project: `Gemfile`, `.git`. + +Note: `Solargraph` should automatically detect and use `rubocop` for formatting. + +## Supported formatters + +```lua +ruby = { "rubocop", "rufo", "standardrb" } +``` + +## Supported linters + +```lua +ruby = { "rubocop", "standardrb" } +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/rust.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/rust.md new file mode 100644 index 00000000..11be6d62 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/rust.md @@ -0,0 +1,82 @@ +# Rust + +## Install Syntax Highlighting + +```vim +:TSInstall rust +``` + +## Supported language servers + +```lua +rust = { "rust_analyzer" } +``` + +## Supported formatters + +```lua +rust = { "rustfmt" } +``` + +## LSP Settings + +```vim +:LspSettings rust_analyzer +``` + +## Extra Plugins + +```lua +vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "rust_analyzer" }) + +lvim.plugins = { + { + "simrat39/rust-tools.nvim", + -- ft = { "rust", "rs" }, -- IMPORTANT: re-enabling this seems to break inlay-hints + config = function() + require("rust-tools").setup { + tools = { + executor = require("rust-tools/executors").termopen, -- can be quickfix or termopen + reload_workspace_from_cargo_toml = true, + inlay_hints = { + auto = true, + only_current_line = false, + show_parameter_hints = true, + parameter_hints_prefix = "<-", + other_hints_prefix = "=>", + max_len_align = false, + max_len_align_padding = 1, + right_align = false, + right_align_padding = 7, + highlight = "Comment", + }, + hover_actions = { + border = { + { "╭", "FloatBorder" }, + { "─", "FloatBorder" }, + { "╮", "FloatBorder" }, + { "│", "FloatBorder" }, + { "╯", "FloatBorder" }, + { "─", "FloatBorder" }, + { "╰", "FloatBorder" }, + { "│", "FloatBorder" }, + }, + auto_focus = true, + }, + }, + server = { + on_init = require("lvim.lsp").common_on_init, + on_attach = function(client, bufnr) + require("lvim.lsp").common_on_attach(client, bufnr) + local rt = require "rust-tools" + -- Hover actions + vim.keymap.set("n", "", rt.hover_actions.hover_actions, { buffer = bufnr }) + -- Code action groups + vim.keymap.set("n", "lA", rt.code_action_group.code_action_group, { buffer = bufnr }) + end, + }, + } + end, + }, +} +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/scala.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/scala.md new file mode 100644 index 00000000..274ec38a --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/scala.md @@ -0,0 +1,60 @@ +# Scala + +## Install Syntax Highlighting + +```vim +:TSInstall scala +``` + +## Install Language Server + +To get scala LSP support working in Lunarvim, first you need to do the prerequisites listed here https://github.com/scalameta/nvim-metals#prerequisites. + +Then use coursier to install the metals language server so that it is available on your PATH: + +`cs install metals` + +## Configure Lunarvim + +Create a file called `~/.config/lvim/lua/user/metals.lua`: + +```lua +local M = {} + +M.config = function() + local metals_config = require("metals").bare_config() + metals_config.on_attach = require("lvim.lsp").common_on_attach + metals_config.settings = { + showImplicitArguments = false, + showInferredType = true, + excludedPackages = {}, + } + metals_config.init_options.statusBarProvider = false + require("metals").initialize_or_attach { metals_config } +end + +return M +``` + +Add the following to your `config.lua` + +```lua +lvim.plugins = { + { + "scalameta/nvim-metals", + config = function() + require("user.metals").config() + end, + }, +} + +lvim.autocommands.custom_groups = { + { "FileType", "scala,sbt", "lua require('user.metals').config()" } +} +``` + +## Supported formatters + +```lua +scala = { "scalafmt" } +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/swift.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/swift.md new file mode 100644 index 00000000..42c9f1b0 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/swift.md @@ -0,0 +1,38 @@ +# Swift + +## Install Syntax Highlighting +```vim +:TSInstall swift +``` + +## Install Language Server + +```vim +:LspInstall sourcekit +``` + + +## Configure Lunarvim + +The `sourcekit` language server is disabled (overridden) by default because of the conflict with `clangd` + +### Lsp Configuration +Create a file called `~/.config/lvim/ftplugin/swift.lua`: + +```lua +local opts = {} +require("lvim.lsp.manager").setup("sourcekit", opts) +``` +The default settings for the `sourcekit` lsp is: +```lua +default_config = { + cmd = { "sourcekit-lsp" } + filetypes = { "swift", "c", "cpp", "objective-c", "objective-cpp" } + root_dir = root_pattern("Package.swift", ".git") +} +``` +## Supported formatters + +```lua +swift = { "swiftformat" } +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/typescript.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/typescript.md new file mode 100644 index 00000000..cd02b798 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/typescript.md @@ -0,0 +1,38 @@ +# TypeScript + +## Syntax highlighting + +```vim +:TSInstall typescript +:TSInstall tsx +``` + +## Supported language servers + +```lua +typescript = { "angularls", "denols", "ember", "eslint", "eslintls", "rome", "stylelint_lsp", "tailwindcss", "tsserver" } +``` + +Only `tsserver` is enabled by default and the other servers need to be [manually configured](./README.md#manually-configured-servers). + +### TypeScript standalone server (tsserver) + +`tsserver` requires one of the following files/folders : `package.json`, [`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html), [`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) or `.git.` in the root directory of the project + +See [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tsserver) for more information about the tsserver language server configuration options. + +## Supported formatters + +```lua +typescript = { "deno", "eslint", "eslint_d", "prettier", "prettier_d_slim", "prettierd", "rustywind" } +``` + +The configured formatter(s) must be installed separately. + +## Supported linters + +```lua +typescript = { "eslint", "eslint_d" } +``` + +The configured linter(s) must be installed separately. diff --git a/i18n/it/docusaurus-plugin-content-docs/current/languages/vue.md b/i18n/it/docusaurus-plugin-content-docs/current/languages/vue.md new file mode 100644 index 00000000..857c6881 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/languages/vue.md @@ -0,0 +1,33 @@ +# Vue + +## Syntax highlighting + +```vim +:TSInstall vue +``` + +## Supported language servers + +```lua +vue = { "eslint", "stylelint_lsp", "tailwindcss", "volar", "vuels" }, +``` + +Only `vuels` is enabled by default and the other servers need to be [manually configured](./README.md#manually-configured-servers). + +## Supported formatters + +```lua +vue = { "eslint", "eslint_d", "prettier", "prettier_d_slim", "prettierd", "rustywind" } +``` + +## Supported linters + +```lua +vue = { "eslint", "eslint_d" } +``` + +## LSP Settings + +```lua +:LspSettings vuels +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/plugins/01-core-plugins-list.md b/i18n/it/docusaurus-plugin-content-docs/current/plugins/01-core-plugins-list.md new file mode 100644 index 00000000..7996d176 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/plugins/01-core-plugins-list.md @@ -0,0 +1,41 @@ +# Core Plugins List + +| name | description | status | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | +| nvim-telescope/telescope.nvim | Find, Filter, Preview, Pick. All lua, all the time. | | +| lewis6991/gitsigns.nvim | Git integration for buffers | | +| folke/lua-dev.nvim | 💻 Dev setup for init.lua and plugin development with full signature help, docs and completion for the nvim lua API. | | +| nvim-treesitter/nvim-treesitter | Nvim Treesitter configurations and abstraction layer | | +| folke/which-key.nvim | 💥 Create key bindings that stick. WhichKey is a lua plugin for Neovim 0.5 that displays a popup with possible keybindings of the command you started typing. | | +| akinsho/bufferline.nvim | A snazzy bufferline for Neovim | | +| hrsh7th/nvim-cmp | A completion plugin for neovim coded in Lua. | | +| hrsh7th/cmp-path | nvim-cmp source for path | | +| kyazdani42/nvim-tree.lua | A file explorer tree for neovim written in lua | | +| numToStr/Comment.nvim | :brain: :muscle: // Smart and powerful comment plugin for neovim. Supports treesitter, dot repeat, left-right/up-down motions, hooks, and more | | +| kyazdani42/nvim-web-devicons | lua `fork` of vim-web-devicons for neovim | | +| b0o/schemastore.nvim | 🛍 JSON schemas for Neovim | | +| windwp/nvim-autopairs | autopairs for neovim written by lua | | +| goolord/alpha-nvim | a lua powered greeter like vim-startify / dashboard-nvim | | +| JoosepAlviste/nvim-ts-context-commentstring | Neovim treesitter plugin for setting the commentstring based on the cursor location in a file. | | +| ahmedkhalf/project.nvim | The superior project management solution for neovim. | | +| L3MON4D3/LuaSnip | Snippet Engine for Neovim written in Lua. | | +| saadparwaiz1/cmp_luasnip | luasnip completion source for nvim-cmp | | +| nvim-lua/plenary.nvim | plenary: full; complete; entire; absolute; unqualified. All the lua functions I don't want to write twice. | | +| hrsh7th/cmp-buffer | nvim-cmp source for buffer words | | +| antoinemadec/FixCursorHold.nvim | Fix CursorHold Performance. | | +| lunarvim/onedarker.nvim | Onedark inspired colorscheme written in lua. | | +| nvim-lua/popup.nvim | [WIP] An implementation of the Popup API from vim in Neovim. Hope to upstream when complete | | +| Tastyep/structlog.nvim | Structured Logging for nvim, using Lua | | +| jose-elias-alvarez/null-ls.nvim | Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua. | | +| williamboman/nvim-lsp-installer | Neovim plugin that allows you to seamlessly manage LSP servers with :LspInstall. With full Windows support! | | +| neovim/nvim-lspconfig | Quickstart configurations for the Nvim LSP client | | +| rafamadriz/friendly-snippets | Set of preconfigured snippets for different languages. | | +| tamago324/nlsp-settings.nvim | A plugin for setting Neovim LSP with JSON or YAML files | | +| hrsh7th/cmp-nvim-lsp | nvim-cmp source for neovim builtin LSP client | | +| nvim-lualine/lualine.nvim | A blazing fast and easy to configure neovim statusline plugin written in pure lua. | | +| nvim-telescope/telescope-fzf-native.nvim | FZF sorter for telescope written in c | | +| wbthomason/packer.nvim | A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config | | +| rcarriga/nvim-notify | A fancy, configurable, notification manager for NeoVim | optional | +| Pocco81/DAPInstall.nvim | 🦆 A NeoVim plugin for managing several debuggers for Nvim-dap | optional | +| akinsho/toggleterm.nvim | A neovim lua plugin to help easily manage multiple terminal windows | optional | +| mfussenegger/nvim-dap | Debug Adapter Protocol client implementation for Neovim (>= 0.5) | optional | diff --git a/i18n/it/docusaurus-plugin-content-docs/current/plugins/02-extra-plugins.md b/i18n/it/docusaurus-plugin-content-docs/current/plugins/02-extra-plugins.md new file mode 100644 index 00000000..47bbf9d9 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/plugins/02-extra-plugins.md @@ -0,0 +1,966 @@ +# Extra Plugins + +Every plugin that works with Neovim works with LunarVim, here are some examples to get you started. + +## Navigation plugins + +### [hop](https://github.com/phaazon/hop.nvim) + +**neovim motions on speed!** + +```lua +{ + "phaazon/hop.nvim", + event = "BufRead", + config = function() + require("hop").setup() + vim.api.nvim_set_keymap("n", "s", ":HopChar2", { silent = true }) + vim.api.nvim_set_keymap("n", "S", ":HopWord", { silent = true }) + end, +}, +``` + +### [lightspeed](https://github.com/ggandor/lightspeed.nvim) + +**jetpack codebase navigation** + +```lua +{ + "ggandor/lightspeed.nvim", + event = "BufRead", +}, +``` + +### [minimap](https://github.com/wfxr/minimap.vim) + +**blazing fast minimap/scrollbar written in Rust** + +```lua +{ + 'wfxr/minimap.vim', + run = "cargo install --locked code-minimap", + -- cmd = {"Minimap", "MinimapClose", "MinimapToggle", "MinimapRefresh", "MinimapUpdateHighlight"}, + config = function () + vim.cmd ("let g:minimap_width = 10") + vim.cmd ("let g:minimap_auto_start = 1") + vim.cmd ("let g:minimap_auto_start_win_enter = 1") + end, +}, +``` + +### [numb](https://github.com/nacro90/numb.nvim) + +**jump to the line** + +```lua +{ + "nacro90/numb.nvim", + event = "BufRead", + config = function() + require("numb").setup { + show_numbers = true, -- Enable 'number' for the window while peeking + show_cursorline = true, -- Enable 'cursorline' for the window while peeking + } + end, +}, +``` + +### [nvim-bqf](https://github.com/kevinhwang91/nvim-bqf) + +**better quickfix window** + +```lua +{ + "kevinhwang91/nvim-bqf", + event = { "BufRead", "BufNew" }, + config = function() + require("bqf").setup({ + auto_enable = true, + preview = { + win_height = 12, + win_vheight = 12, + delay_syntax = 80, + border_chars = { "┃", "┃", "━", "━", "┏", "┓", "┗", "┛", "█" }, + }, + func_map = { + vsplit = "", + ptogglemode = "z,", + stoggleup = "", + }, + filter = { + fzf = { + action_for = { ["ctrl-s"] = "split" }, + extra_opts = { "--bind", "ctrl-o:toggle-all", "--prompt", "> " }, + }, + }, + }) + end, +}, +``` + +### [nvim-spectre](https://github.com/windwp/nvim-spectre) + +**search and replace** + +```lua +{ + "windwp/nvim-spectre", + event = "BufRead", + config = function() + require("spectre").setup() + end, +}, +``` + +### [rnvimr](https://github.com/kevinhwang91/rnvimr) + +**ranger file explorer window** + +```lua +{ + "kevinhwang91/rnvimr", + cmd = "RnvimrToggle", + config = function() + vim.g.rnvimr_draw_border = 1 + vim.g.rnvimr_pick_enable = 1 + vim.g.rnvimr_bw_enable = 1 + end, +}, +``` + +### [snap](https://github.com/camspiers/snap) + +**fast finder system** + +```lua +{ + "camspiers/snap", + rocks = "fzy", + config = function() + local snap = require "snap" + local layout = snap.get("layout").bottom + local file = snap.config.file:with { consumer = "fzy", layout = layout } + local vimgrep = snap.config.vimgrep:with { layout = layout } + snap.register.command("find_files", file { producer = "ripgrep.file" }) + snap.register.command("buffers", file { producer = "vim.buffer" }) + snap.register.command("oldfiles", file { producer = "vim.oldfile" }) + snap.register.command("live_grep", vimgrep {}) + end, +}, +``` + +### [vim-matchup](https://github.com/andymass/vim-matchup) + +**navigate and highlight matching words** + +```lua +{ + "andymass/vim-matchup", + event = "CursorMoved", + config = function() + vim.g.matchup_matchparen_offscreen = { method = "popup" } + end, +}, +``` + +### [nvim-window-picker](https://github.com/s1n7ax/nvim-window-picker) + +**jump to any window using a selector like the one nvim-tree uses** + +```lua +{ + "s1n7ax/nvim-window-picker", + tag = "1.*", + config = function() + require("window-picker").setup({ + autoselect_one = true, + include_current = false, + filter_rules = { + -- filter using buffer options + bo = { + -- if the file type is one of following, the window will be ignored + filetype = { "neo-tree", "neo-tree-popup", "notify", "quickfix" }, + + -- if the buffer type is one of following, the window will be ignored + buftype = { "terminal" }, + }, + }, + other_win_hl_color = "#e35e4f", + }) + end, + } + +-- example mappings you can place in some other place +-- An awesome method to jump to windows +local picker = require('window-picker') + +vim.keymap.set("n", ",w", function() + local picked_window_id = picker.pick_window({ + include_current_win = true + }) or vim.api.nvim_get_current_win() + vim.api.nvim_set_current_win(picked_window_id) +end, { desc = "Pick a window" }) + +-- Swap two windows using the awesome window picker +local function swap_windows() + local window = picker.pick_window({ + include_current_win = false + }) + local target_buffer = vim.fn.winbufnr(window) + -- Set the target window to contain current buffer + vim.api.nvim_win_set_buf(window, 0) + -- Set current window to contain target buffer + vim.api.nvim_win_set_buf(0, target_buffer) +end + +vim.keymap.set('n', ',W', swap_windows, { desc = 'Swap windows' }) + +``` + +## Git + +### [diffview](https://github.com/sindrets/diffview.nvim) + +**git diff in a single tabpage** + +```lua +{ + "sindrets/diffview.nvim", + event = "BufRead", +}, +``` + +### [git-blame](https://github.com/f-person/git-blame.nvim) + +**show git blame** + +```lua +{ + "f-person/git-blame.nvim", + event = "BufRead", + config = function() + vim.cmd "highlight default link gitblame SpecialComment" + vim.g.gitblame_enabled = 0 + end, +}, +``` + +### [gitlinker](https://github.com/ruifm/gitlinker.nvim) + +**generate shareable file permalinks for several git web frontend hosts** + +```lua +{ + "ruifm/gitlinker.nvim", + event = "BufRead", + config = function() + require("gitlinker").setup { + opts = { + -- remote = 'github', -- force the use of a specific remote + -- adds current line nr in the url for normal mode + add_current_line_on_normal_mode = true, + -- callback for what to do with the url + action_callback = require("gitlinker.actions").open_in_browser, + -- print the url after performing the action + print_url = false, + -- mapping to call url generation + mappings = "gy", + }, + } + end, + requires = "nvim-lua/plenary.nvim", +}, +``` + +### [octo](https://github.com/pwntester/octo.nvim) + +**edit and review GitHub issues and pull requests** + +```lua +{ + "pwntester/octo.nvim", + event = "BufRead", +}, +``` + +### [vim-fugitive](https://github.com/tpope/vim-fugitive) + +**git wrapper** + +```lua +{ + "tpope/vim-fugitive", + cmd = { + "G", + "Git", + "Gdiffsplit", + "Gread", + "Gwrite", + "Ggrep", + "GMove", + "GDelete", + "GBrowse", + "GRemove", + "GRename", + "Glgrep", + "Gedit" + }, + ft = {"fugitive"} +}, +``` + +### [vim-gist](https://github.com/mattn/vim-gist) + +**create/edit Github gists** + +```lua +{ + "mattn/vim-gist", + event = "BufRead", + requires = "mattn/webapi-vim", +}, +``` + +## Treesitter + +### [nvim-ts-autotag](https://github.com/windwp/nvim-ts-autotag) + +**autoclose and autorename html tag** + +```lua +{ + "windwp/nvim-ts-autotag", + config = function() + require("nvim-ts-autotag").setup() + end, +}, +``` + +### [nvim-ts-context-commentstring](https://github.com/JoosepAlviste/nvim-ts-context-commentstring) + +**commentstring option based on the cursor location** + +```lua +{ + "JoosepAlviste/nvim-ts-context-commentstring", + event = "BufRead", +}, +``` + +### [nvim-ts-rainbow](https://github.com/p00f/nvim-ts-rainbow) + +**rainbow parentheses** + +```lua +{ + "p00f/nvim-ts-rainbow", +}, +``` +After installing ensure to enable it in your `config.lua` using: +``` +... +lvim.builtin.treesitter.rainbow.enable = true +... +``` + +### [playground](https://github.com/nvim-treesitter/playground) + +**view treesitter information** + +```lua +{ + "nvim-treesitter/playground", + event = "BufRead", +}, +``` + +### [nvim-treesitter-context](https://github.com/romgrk/nvim-treesitter-context) + +**Show current function at the top of the screen when function does not fit in screen** + +```lua +{ + "romgrk/nvim-treesitter-context", + config = function() + require("treesitter-context").setup{ + enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) + throttle = true, -- Throttles plugin updates (may improve performance) + max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. + patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries. + -- For all filetypes + -- Note that setting an entry here replaces all other patterns for this entry. + -- By setting the 'default' entry below, you can control which nodes you want to + -- appear in the context window. + default = { + 'class', + 'function', + 'method', + }, + }, + } + end + }, +``` + +## Telescope Extensions + +### How to install telescope extensions + +First **add your telescope extension to the list of plugins** as usual (`lvim.plugins = { ... }`) following the extension instructions. +There are several ways to register extensions within telescope, but the safer is using the `on_config_done` callback for telescope. +Create the callback function anywhere in your `config.lua`. This function will be called when telescope has finished loading and will get telescope as its only parameter. +Finally, within the `on_config_done` callback register your extension : + +```lua +lvim.builtin.telescope.on_config_done = function(telescope) + pcall(telescope.load_extension, "frecency") + pcall(telescope.load_extension, "neoclip") + -- any other extensions loading +end +``` + +### [telescope-fzy-native.nvim](https://github.com/nvim-telescope/telescope-fzy-native.nvim) + +**fzy style sorter that is compiled** + +```lua +{ + "nvim-telescope/telescope-fzy-native.nvim", + run = "make", + event = "BufRead", +}, +``` + +### [telescope-project](https://github.com/nvim-telescope/telescope-project.nvim) + +**switch between projects** + +```lua +{ + "nvim-telescope/telescope-project.nvim", + event = "BufWinEnter", + setup = function() + vim.cmd [[packadd telescope.nvim]] + end, +}, +``` + +## Colorschemes + +### [lsp-colors](https://github.com/folke/lsp-colors.nvim) + +**lsp diagnostics highlight groups for non lsp colorschemes** + +```lua +{ + "folke/lsp-colors.nvim", + event = "BufRead", +}, +``` + +### [lush.nvim](https://github.com/rktjmp/lush.nvim) + +**colorscheme creation aid** + +```lua +{ + "rktjmp/lush.nvim", +}, +``` + +### [nvim-colorizer](https://github.com/norcalli/nvim-colorizer.lua) + +**color highlighter** + +```lua +{ + "norcalli/nvim-colorizer.lua", + config = function() + require("colorizer").setup({ "css", "scss", "html", "javascript" }, { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + RRGGBBAA = true, -- #RRGGBBAA hex codes + rgb_fn = true, -- CSS rgb() and rgba() functions + hsl_fn = true, -- CSS hsl() and hsla() functions + css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn + }) + end, +}, +``` + +## LSP Enhancement + +### [cmp-tabnine](https://github.com/tzachar/cmp-tabnine) + +**TabNine completion engine for hrsh7th/nvim-cmp** + +```lua +{ + "tzachar/cmp-tabnine", + run = "./install.sh", + requires = "hrsh7th/nvim-cmp", + event = "InsertEnter", +}, +``` + +### [goto-preview](https://github.com/rmagatti/goto-preview) + +**previewing goto definition calls** + +```lua +{ + "rmagatti/goto-preview", + config = function() + require('goto-preview').setup { + width = 120; -- Width of the floating window + height = 25; -- Height of the floating window + default_mappings = false; -- Bind default mappings + debug = false; -- Print debug information + opacity = nil; -- 0-100 opacity level of the floating window where 100 is fully transparent. + post_open_hook = nil -- A function taking two arguments, a buffer and a window to be ran as a hook. + -- You can use "default_mappings = true" setup option + -- Or explicitly set keybindings + -- vim.cmd("nnoremap gpd lua require('goto-preview').goto_preview_definition()") + -- vim.cmd("nnoremap gpi lua require('goto-preview').goto_preview_implementation()") + -- vim.cmd("nnoremap gP lua require('goto-preview').close_all_win()") + } + end +}, +``` + +### [lsp-rooter](https://github.com/ahmedkhalf/lsp-rooter.nvim) + +**cwd to the project's root directory** + +```lua +{ + "ahmedkhalf/lsp-rooter.nvim", + event = "BufRead", + config = function() + require("lsp-rooter").setup() + end, +}, +``` + +### [lsp_signature.nvim](https://github.com/ray-x/lsp_signature.nvim) + +**hint when you type** + +```lua +{ + "ray-x/lsp_signature.nvim", + event = "BufRead", + config = function() require"lsp_signature".on_attach() end, +}, +``` + +### [symbols-outline.nvim](https://github.com/simrat39/symbols-outline.nvim) + +**a tree like view for symbols** + +```lua +{ + "simrat39/symbols-outline.nvim", + config = function() + require('symbols-outline').setup() + end +}, +``` + +### [trouble.nvim](https://github.com/folke/trouble.nvim) + +**diagnostics, references, telescope results, quickfix and location lists** + +```lua +{ + "folke/trouble.nvim", + cmd = "TroubleToggle", +}, +``` + +Also define keybindings in `config.lua` + +```lua +lvim.builtin.which_key.mappings["t"] = { + name = "Diagnostics", + t = { "TroubleToggle", "trouble" }, + w = { "TroubleToggle workspace_diagnostics", "workspace" }, + d = { "TroubleToggle document_diagnostics", "document" }, + q = { "TroubleToggle quickfix", "quickfix" }, + l = { "TroubleToggle loclist", "loclist" }, + r = { "TroubleToggle lsp_references", "references" }, +}, +``` + +## General + +### [autosave](https://github.com/Pocco81/AutoSave.nvim) + +**automatically saving your work whenever you make changes to it** + +```lua +{ + "Pocco81/AutoSave.nvim", + config = function() + require("autosave").setup() + end, +}, +``` + +### [codi.vim](https://github.com/metakirby5/codi.vim) + +**interactive scratchpad for hackers** + +```lua +{ + "metakirby5/codi.vim", + cmd = "Codi", +}, +``` + +### [copilot.lua](https://github.com/zbirenbaum/copilot.lua) and [copilot-cmp](https://github.com/zbirenbaum/copilot-cmp) + +**let a computer write code for you** + +You need to authenticate according to [the instructions](https://github.com/zbirenbaum/copilot.lua#preliminary-steps). + +```lua +lvim.plugins = { + { "zbirenbaum/copilot.lua", + event = { "VimEnter" }, + config = function() + vim.defer_fn(function() + require("copilot").setup { + plugin_manager_path = get_runtime_dir() .. "/site/pack/packer", + } + end, 100) + end, + }, + + { "zbirenbaum/copilot-cmp", + after = { "copilot.lua", "nvim-cmp" }, + }, + ... +} + +-- Can not be placed into the config method of the plugins. +lvim.builtin.cmp.formatting.source_names["copilot"] = "(Copilot)" +table.insert(lvim.builtin.cmp.sources, 1, { name = "copilot" }) +``` + +### [dial.nvim](https://github.com/monaqa/dial.nvim) + +**extended incrementing/decrementing** + +```lua +{ + "monaqa/dial.nvim", + event = "BufRead", + config = function() + local dial = require "dial" + vim.cmd [[ + nmap (dial-increment) + nmap (dial-decrement) + vmap (dial-increment) + vmap (dial-decrement) + vmap g (dial-increment-additional) + vmap g (dial-decrement-additional) + ]] + + dial.augends["custom#boolean"] = dial.common.enum_cyclic { + name = "boolean", + strlist = { "true", "false" }, + } + table.insert(dial.config.searchlist.normal, "custom#boolean") + + -- For Languages which prefer True/False, e.g. python. + dial.augends["custom#Boolean"] = dial.common.enum_cyclic { + name = "Boolean", + strlist = { "True", "False" }, + } + table.insert(dial.config.searchlist.normal, "custom#Boolean") + end, +}, + +``` + +### [glow.nvim](https://github.com/npxbr/glow.nvim) + +**preview markdown in neovim** + +```lua +-- You must install glow globally +-- https://github.com/charmbracelet/glow +-- yay -S glow +{ + "npxbr/glow.nvim", + ft = {"markdown"} + -- run = "yay -S glow" +}, +``` + +### [indent-blankline](https://github.com/lukas-reineke/indent-blankline.nvim) + +**indentation guides for every line** + +```lua +{ + "lukas-reineke/indent-blankline.nvim", + event = "BufRead", + config = function() + local opts = { + -- char = "▏", + filetype_exclude = { + "alpha", + "help", + "terminal", + "dashboard", + "lspinfo", + "lsp-installer", + "mason", + }, + buftype_exclude = { "terminal" }, + bufname_exclude = { "config.lua" }, + + show_trailing_blankline_indent = false, + show_first_indent_level = false, + -- use_treesitter = false, + } + + require("indent_blankline").setup(opts) + end +}, +``` + +### [markdown-preview.nvim](https://github.com/iamcco/markdown-preview.nvim) + +**preview markdown in the browser** + +```lua +{ + "iamcco/markdown-preview.nvim", + run = "cd app && npm install", + ft = "markdown", + config = function() + vim.g.mkdp_auto_start = 1 + end, +}, +``` + +### [neoscroll](https://github.com/karb94/neoscroll.nvim) + +**smooth scrolling** + +```lua +{ + "karb94/neoscroll.nvim", + event = "WinScrolled", + config = function() + require('neoscroll').setup({ + -- All these keys will be mapped to their corresponding default scrolling animation + mappings = {'', '', '', '', + '', '', 'zt', 'zz', 'zb'}, + hide_cursor = true, -- Hide cursor while scrolling + stop_eof = true, -- Stop at when scrolling downwards + use_local_scrolloff = false, -- Use the local scope of scrolloff instead of the global scope + respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file + cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further + easing_function = nil, -- Default easing function + pre_hook = nil, -- Function to run before the scrolling animation starts + post_hook = nil, -- Function to run after the scrolling animation ends + }) + end +}, +``` + +### [neuron](https://github.com/oberblastmeister/neuron.nvim) + +**next generation note-taking** + +```lua + {"oberblastmeister/neuron.nvim"}, +``` + +### [nvim-lastplace](https://github.com/ethanholz/nvim-lastplace) + +**pick up where you left off** + +```lua + { + "ethanholz/nvim-lastplace", + event = "BufRead", + config = function() + require("nvim-lastplace").setup({ + lastplace_ignore_buftype = { "quickfix", "nofile", "help" }, + lastplace_ignore_filetype = { + "gitcommit", "gitrebase", "svn", "hgcommit", + }, + lastplace_open_folds = true, + }) + end, + }, +``` + +### [persistence](https://github.com/folke/persistence.nvim) + +**simple session management** + +```lua +{ + "folke/persistence.nvim", + event = "BufReadPre", -- this will only start session saving when an actual file was opened + module = "persistence", + config = function() + require("persistence").setup { + dir = vim.fn.expand(vim.fn.stdpath "config" .. "/session/"), + options = { "buffers", "curdir", "tabpages", "winsize" }, + } + end, +}, +``` + +Also define keybindings in your `config.lua` + +```lua + lvim.builtin.which_key.mappings["S"]= { + name = "Session", + c = { "lua require('persistence').load()", "Restore last session for current dir" }, + l = { "lua require('persistence').load({ last = true })", "Restore last session" }, + Q = { "lua require('persistence').stop()", "Quit without saving session" }, + } +``` + +### [todo-comments.nvim](https://github.com/folke/todo-comments.nvim) + +**highlight and search for todo comments** + +```lua +{ + "folke/todo-comments.nvim", + event = "BufRead", + config = function() + require("todo-comments").setup() + end, +}, +``` + +### [vim-cursorword](https://github.com/itchyny/vim-cursorword) + +**underlines the word under the cursor** + +```lua +{ + "itchyny/vim-cursorword", + event = {"BufEnter", "BufNewFile"}, + config = function() + vim.api.nvim_command("augroup user_plugin_cursorword") + vim.api.nvim_command("autocmd!") + vim.api.nvim_command("autocmd FileType NvimTree,lspsagafinder,dashboard,vista let b:cursorword = 0") + vim.api.nvim_command("autocmd WinEnter * if &diff || &pvw | let b:cursorword = 0 | endif") + vim.api.nvim_command("autocmd InsertEnter * let b:cursorword = 0") + vim.api.nvim_command("autocmd InsertLeave * let b:cursorword = 1") + vim.api.nvim_command("augroup END") + end +}, +``` + +### [vim-repeat](https://github.com/tpope/vim-repeat) + +**enable repeating supported plugin maps with "."** + +```lua +{ "tpope/vim-repeat" }, +``` + +### [vim-sanegx](https://github.com/felipec/vim-sanegx) + +**open url with `gx`** + +```lua +{ + "felipec/vim-sanegx", + event = "BufRead", +}, +``` + +### [vim-surround](https://github.com/tpope/vim-surround) + +**mappings to delete, change and add surroundings** + +```lua +{ + "tpope/vim-surround", + + -- make sure to change the value of `timeoutlen` if it's not triggering correctly, see https://github.com/tpope/vim-surround/issues/117 + -- setup = function() + -- vim.o.timeoutlen = 500 + -- end +}, +``` + +### [vim-wakatime](https://github.com/wakatime/vim-wakatime) + +**metrics, insights, and time tracking automatically generated from your programming activity** + +```lua +{ + "wakatime/vim-wakatime" +} +``` + +Once installed and synced, add your WakaTime API Key via `:WakaTimeApiKey` command + +## Language specific + +### [bracey](https://github.com/turbio/bracey.vim) + +**live edit html, css, and javascript** + +```lua +{ + "turbio/bracey.vim", + cmd = {"Bracey", "BracyStop", "BraceyReload", "BraceyEval"}, + run = "npm install --prefix server", +}, +``` + +### [vim-bundler](https://github.com/tpope/vim-bundler) + +**lightweight support for ruby's bundler** + +```lua +{ + "tpope/vim-bundler", + cmd = {"Bundler", "Bopen", "Bsplit", "Btabedit"} +}, +``` + +### [vim-rails](https://github.com/tpope/vim-rails) + +**edit ruby on rails applications** + +```lua +{ + "tpope/vim-rails", + cmd = { + "Eview", + "Econtroller", + "Emodel", + "Smodel", + "Sview", + "Scontroller", + "Vmodel", + "Vview", + "Vcontroller", + "Tmodel", + "Tview", + "Tcontroller", + "Rails", + "Generate", + "Runner", + "Extract" + } +}, + +``` diff --git a/i18n/it/docusaurus-plugin-content-docs/current/plugins/README.md b/i18n/it/docusaurus-plugin-content-docs/current/plugins/README.md new file mode 100644 index 00000000..3106d175 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/plugins/README.md @@ -0,0 +1,84 @@ +# Plugins + +Plugins are managed by [Packer](https://github.com/wbthomason/packer.nvim), and are split into [core-plugins](./01-core-plugins-list.md) and user-plugins. + +- from [lua/lvim/plugin-loader.lua](https://github.com/lunarvim/lunarvim/blob/10c7753d8e6f572974f9b9e0d0d8631cd13e60ea/lua/lvim/plugin-loader.lua): + +```lua +--- to check the full configuration `:lua print(vim.inspect(require('packer').config))` +local compile_path = join_paths(get_config_dir(), "plugin", "packer_compiled.lua") +local snapshot_path = join_paths(get_cache_dir(), "snapshots") +local package_root = join_paths(vim.fn.stdpath("data"), "site", "pack") + +local init_opts = { + package_root = package_root, + compile_path = compile_path, + snapshot_path = snapshot_path, + log = { level = "warn" }, + git = { + clone_timeout = 300, + }, + display = { + open_fn = function() + return require("packer.util").float { border = "rounded" } + end, + }, +} + +packer.init(init_opts) +``` + +::: tip +use `:PackerStatus` to see a list of all installed plugins! +::: + +## Core plugins + +The configurations for core plugins are accessible through `lvim.builtin`. Most should contain an `active` attribute that can be set to `false` to disable the plugin + +```lua +lvim.builtin.alpha.active = true +lvim.builtin.dap.active = true -- (default: false) +lvim.builtin.terminal.active = true +``` +::: warning IMPORTANT +disabling a plugin will not take effect until you run `:PackerSync` or preferably `:LvimSyncCorePlugins` +::: + +You can press `` to get autocomplete suggestions to explore these settings. + +```lua +lvim.builtin.cmp.completion.keyword_length = 2 +lvim.builtin.telescope.defaults.layout_config.width = 0.95 +lvim.builtin.telescope.defaults.layout_config.preview_cutoff = 75 +``` + +::: tip +A plugin's README (and `docs/` folder if it exists) typically contain excellent documentation, so it may be worthwhile to create an alias for if you use them often. +::: + +### Pinning strategy + +Snapshot support has been added in [lunarvim#2351](https://github.com/LunarVim/LunarVim/pull/2351): + +> 1. add a default snapshot, `snapshots/default.json`, to hold the commits of all the core plugins +> 2. `LvimSyncCorePlugins` now uses `:PackerSnapshotRollback` +> 3. reduce errors caused by breaking changes in user plugins since they're not handled anymore with `packer.sync()` +> 4. `PackerSync` will now ignore all the core plugins which are already handled with snapshots, this makes it signficantly faster to finish. +> 5. allow "unlocking" all the core plugins, by setting an environment variable `$LVIM_DEV_MODE`, e.g. can be defined in `~/.local/bin/lvim` +> 6. `$LUNARVIM_CACHE_DIR/snapshots/` can be used to store complete snapshots of _all_ the installed plugins, `:h packer.snapshot()`. +> 7. add a new handler to allow updating `snapshots/default.json` that does not rely on packer or lvim's runtime. It could be completely re-written in any other language. + +## User plugins + +User plugins can be installed by adding entries to the `lvim.plugins` table in your `config.lua` file, and saving or manually invoking `LvimReload` will trigger Packer to sync all the plugins in that table. + +```lua +lvim.plugins = { + {"lunarvim/colorschemes"}, + {"folke/tokyonight.nvim"}, +} +``` +Check the [extra plugins](./02-extra-plugins.md) for some suggestions. + +_Note: removing a plugin from the `lvim.plugin` table removes it from your configuration but not your system. Any plugins left in the `start` directory will still autostart. To remove them completely, run `:PackerSync`._ diff --git a/i18n/it/docusaurus-plugin-content-docs/current/plugins/_category_.json b/i18n/it/docusaurus-plugin-content-docs/current/plugins/_category_.json new file mode 100644 index 00000000..03b11f77 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/plugins/_category_.json @@ -0,0 +1,3 @@ +{ + "position": 5 +} diff --git a/i18n/it/docusaurus-plugin-content-docs/current/sponsors/01-donate.md b/i18n/it/docusaurus-plugin-content-docs/current/sponsors/01-donate.md new file mode 100644 index 00000000..0033252d --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/sponsors/01-donate.md @@ -0,0 +1,6 @@ +# How to Donate + +- [Patreon](https://www.patreon.com/chrisatmachine) +- [Github Sponsors](https://github.com/sponsors/ChristianChiarulli) +- Crypto (to do) +- Merch (to do) diff --git a/i18n/it/docusaurus-plugin-content-docs/current/sponsors/README.md b/i18n/it/docusaurus-plugin-content-docs/current/sponsors/README.md new file mode 100644 index 00000000..ffda21e9 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/sponsors/README.md @@ -0,0 +1,5 @@ +# Thank You! + +To have your name listed here with a link to whatever you want please contact Chris@Machine on Discord or Matrix. + +- You! diff --git a/i18n/it/docusaurus-plugin-content-docs/current/sponsors/_category_.json b/i18n/it/docusaurus-plugin-content-docs/current/sponsors/_category_.json new file mode 100644 index 00000000..dcf9d94a --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/sponsors/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Sponsor", + "position": 10 +} diff --git a/i18n/it/docusaurus-plugin-content-docs/current/troubleshooting/README.md b/i18n/it/docusaurus-plugin-content-docs/current/troubleshooting/README.md new file mode 100644 index 00000000..1e0add01 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/troubleshooting/README.md @@ -0,0 +1,144 @@ +# Installation + +## General + +1. Make sure to check that you have a recent Neovim version with `luajit` support. The output of version information `nvim -v` should include a line for: `LuaJIT`. +2. Make sure all the dependencies listed in [Manual Install](#manual-install) are actually installed on your system. + +## Unable to run `lvim` + +Make sure that `lvim` is available and executable on your path. You can check the results of these commands to verify that + +```shell +which lvim +stat "$(which lvim)" +cat "$(which lvim)" +``` + +If you get errors with any of the above commands, then you need to either fix that manually or reinstall the binary again. + +```shell +cd # this will be in `~/.local/share/lunarvim/lvim` by default +bash utils/installer/install_bin.sh +``` + +## Getting errors after an update + +### Cache issues + +This might be the result of old cache files that need to be reset. LunarVim makes use of [impatients's](https://github.com/lewis6991/impatient.nvim) to optimize the startup procedure and deliver a snappy experience. + +1. while running LunarVim: `:LvimCacheReset` +2. from the CLI: `lvim +LvimCacheReset` + +### Plugin issue + +Another common reason for such errors is due to Packer being unable to fully restore a snapshot. This could be due to multiple reasons, but mostl commonly it's a breaking change in some plugin, or `git` refusing to pull an update to a plugin because it [can't safely fast-forward the current branch](https://blog.sffc.xyz/post/185195398930/why-you-should-use-git-pull-ff-only-git-is-a). + +The easiest way to solve this is to manually update (a rebase is likely required) the offending plugin, which should be located in [Packer's package-root](https://github.com/wbthomason/packer.nvim/blob/4dedd3b08f8c6e3f84afbce0c23b66320cd2a8f2/doc/packer.txt#L199) at `$LUNARVIM_RUNTIME_DIR/site/pack/packer`. + +Let's say it's `nvim-cmp` for example + +```vim +:! git -C "$LUNARVIM_RUNTIME_DIR/site/pack/packer/start/nvim-cmp" status +``` + +now check which commit is currently checked out +```vim +:! git -C "$LUNARVIM_RUNTIME_DIR/site/pack/packer/start/nvim-cmp" log -1 +``` + +it should match the one in `$LUNARVIM_RUNTIME_DIR/lvim/snapshots/default.json`, but you can always restore the snapshot with `:LvimSyncCorePlugins` + +```vim +:! git -C "$LUNARVIM_RUNTIME_DIR/site/pack/packer/start/nvim-cmp" pull --rebase +``` + +### Packer failure + +if you have not done any changes to any of the plugins, then you can remove Packer's package root completely. + +```shell +LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-$HOME/.local/share/lunarvim}" +rm -rf "$LUNARVIM_RUNTIME_DIR/site/pack/packer" +``` + +now open `lvim`, you'll see a lot of errors about all the plugins missing, but running `:LvimSyncCorePlugins` should fix them all. + +## LunarVim is slow! + +### are you using `fish`? + +> First of all, it is not recommended to set shell to fish in vim. Plenty of vim addons execute fish-incompatible shellscript, so setting it to /bin/sh is typically better, especially if you have no good reason to set it to fish. + +```lua +vim.opt.shell = "/bin/sh" +``` + +See [fish-shell/fish-shell#7004](https://github.com/fish-shell/fish-shell/issues/7004) and `:h 'shell'` for more info. + +## Language server XXX does not start for me! + +### Update node + +Some language servers depend on newer versions of node. Update your version of node to the latest. + +### is it overriden? + +This could be due to the fact that the server is [overridden](../languages/README.md#server-override) + +```lua +--- is it in this list? +:lua print(vim.inspect(lvim.lsp.automatic_configuration.skipped_servers)) +``` + +If that's the case, then you need to either remove it from that list and re-run `:LvimCacheReset` + +```lua +vim.tbl_map(function(server) + return server ~= "emmet_ls" +end, lvim.lsp.automatic_configuration.skipped_servers) +``` + +or set it up [manually](../languages/README.md#server-setup). + +### is it supported by [nvim-lsp-installer](https://github.com/williamboman/nvim-lsp-installer)? + +Any server that does not show up in `LspInstallInfo` needs to be installed manually. + +### is it at least showing up in `:LspInfo`? + +Check out the tips for [debugging nvim-lspconfig](https://github.com/neovim/nvim-lspconfig#debugging). + +## Too many language servers are starting at once! + +Are any of these servers [overridden](../languages/README.md#server-override) by default? + +```lua +:lua print(vim.inspect(require("lvim.lsp.config").override)) +``` + +If they are then you are using the syntax prior to [LunarVim#1813](https://github.com/LunarVim/LunarVim/pull/1813). + +```lua +-- this is the correct syntax since 3dd60bd +vim.list_extend(lvim.lsp.override, { "jsonls" }) +``` + +```lua +-- this the correct syntax since 198577a +vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "jsonls" }) +``` + + +## My LunarVim looks ugly! + +- Make sure that you have a terminal that supports 24-bit colors. If not, you might face some issues regarding the default colorscheme, and other colorschemes. + - For a explainer on what 24-bit colors are, and to test if your terminal supports it, we like this usefull repository: https://github.com/termstandard/colors + +- Another issue might be `termguicolors`. If this is the case, we advice you to look at the official neovim docs: + - What is `termguicolors`? see + +- Another case might be that your `$TERM` variable changes the colors in your terminal. + - For this, we advice you to look and see if anyone else has the same `$TERM` variable as you, and what they did https://github.com/neovim/neovim/issues?q=label%3Atui+color + diff --git a/i18n/it/docusaurus-plugin-content-docs/current/troubleshooting/_category_.json b/i18n/it/docusaurus-plugin-content-docs/current/troubleshooting/_category_.json new file mode 100644 index 00000000..60526355 --- /dev/null +++ b/i18n/it/docusaurus-plugin-content-docs/current/troubleshooting/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Troubleshooting", + "position": 8 +}