From 7d2b9de5b5cb4c7973e8923a58e9518743f7cb65 Mon Sep 17 00:00:00 2001 From: Dionisio E Alonso Date: Sun, 7 Aug 2022 18:09:40 -0300 Subject: [PATCH 1/3] feat: Update README instructions for symbols Updated the instructions for viewing symbols within Neovim/Vim in the README file. --- README.rst | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/README.rst b/README.rst index a66d170..0f21fd5 100644 --- a/README.rst +++ b/README.rst @@ -36,24 +36,37 @@ git-clone flags you can fix that by running: Fonts with icon glyphs '''''''''''''''''''''' -If there are some glyphs on Neovim/Vim that appear to be missing or broken, you -may need to patch your own font with the NerdFonts project. +Some glyphs (icons) on Neovim/Vim might appear to be missing or broken!!! You +may need to use a patched font with the `NerdFonts `_ +project. Neovim/Vim config here has some automatic code completion. Instead of using words or letters for representing the different kind of completion items, -this config uses nice icons from popular IDEs to give some familiar look. +this config uses nice icons like popular IDEs to give some familiar look. Easy fix ~~~~~~~~ -Choose some other symbols available in you coding font of preference and set -them in ``nvim/lua/lsp_symbols.lua`` and in ``vim/coc-settings.json``. Or -just delete all settings of ``lspkind_symbol_map`` and -``completionItemKindLabels`` within those files, respectively, and let the -plugin choose the defaults. +Choose your favourite programming font (already patched) from `NerdFonts +`_, install it +on your system and set it as your terminal profile font. -Not so easy fix: Patch your own font with codeicons glyphs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +(Alternatively) +^^^^^^^^^^^^^^^ + +You may prefer not to have symbols at all. In that case, you have to: + +1. In ``nvim/lsp_client_settings.vim`` file comment-out/delete: + + * the entry line ``formatting = {format = cmp_format}`` + + * the 4 diagnostics lines starting with: ``sign define DiagnosticSign`` + +2. In ``vim/coc-settings.json`` delete the entry + ``suggest.completionItemKindLabels``. + +Not so easy fix: Patch your own font +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Install FontForge, for instance, on a Debian-based distro you can install this: :: @@ -65,12 +78,11 @@ inside that directory run the following commands (This example assumes you are patching Iosevka font, but you can patch one of your choice): :: - ./nerd-fonts$ wget --content-disposition "https://microsoft.github.io/vscode-codicons/dist/codicon.ttf" -P ./src/glyphs/ - ./nerd-fonts$ ls -u ../Iosevka/v3.2.2/ttf-unhinted/iosevka-curly-slab-{regular,bold,italic,bolditalic,extended{,bold,italic,bolditalic}}.ttf | - while read file - do - python3 ./font-patcher -c -out ~/.local/share/fonts/"Iosevka Nerd Font"/ -ext otf --custom codicon.ttf $file - done + ./nerd-fonts$ ls -u ~/.local/share/fonts/Iosevka/v15.6.2/ttf-unhinted/iosevka-curly-slab-{regular,bold,italic,bolditalic,extended{,bold,italic,bolditalic}}.ttf | + while read file + do + fontforge -script ./font-patcher -c -out=$HOME/.local/share/fonts/"Iosevka Nerd Font"/ -ext=otf $file + done For other uses of the ``font-patcher`` tool you can read the `official documentation From 46daa3177e04c787b15bf7c87e3a72218d25d0cb Mon Sep 17 00:00:00 2001 From: Dionisio E Alonso Date: Sun, 7 Aug 2022 18:18:48 -0300 Subject: [PATCH 2/3] feat: Move Neovim/Vim specific docs to their own README There is too many instructions specifically for the code editors Neovim/Vim. Having their instructions in the main project README file can confuse and overwhelm. --- README.rst | 67 ++++----------------------------------------- nvim/README.rst | 72 +++++++++++++++++++++++++++++++++++++++++++++++++ vim/README.rst | 1 + 3 files changed, 78 insertions(+), 62 deletions(-) create mode 100644 nvim/README.rst create mode 120000 vim/README.rst diff --git a/README.rst b/README.rst index 0f21fd5..6bb6a51 100644 --- a/README.rst +++ b/README.rst @@ -11,15 +11,8 @@ Take into account that this project has submodules. When cloning do it as: $ git clone --recurse-submodules --remote-submodules https://gitlab.com/baco/dotconf.git - -Some Neovim/Vim specifics -------------------------- - -For using Vim with coc.nvim plugin, you need to install Node+npm. One way of -doing that is: -:: - - $ curl -sL install-node.now.sh/lts | bash -s -- --prefix ~/.local +Updating +'''''''' Periodically update submodules with the following ``git`` command: :: @@ -33,60 +26,10 @@ git-clone flags you can fix that by running: $ git submodule update --remote --init -Fonts with icon glyphs -'''''''''''''''''''''' +Some Neovim/Vim specifics +------------------------- -Some glyphs (icons) on Neovim/Vim might appear to be missing or broken!!! You -may need to use a patched font with the `NerdFonts `_ -project. - -Neovim/Vim config here has some automatic code completion. Instead of using -words or letters for representing the different kind of completion items, -this config uses nice icons like popular IDEs to give some familiar look. - -Easy fix -~~~~~~~~ - -Choose your favourite programming font (already patched) from `NerdFonts -`_, install it -on your system and set it as your terminal profile font. - -(Alternatively) -^^^^^^^^^^^^^^^ - -You may prefer not to have symbols at all. In that case, you have to: - -1. In ``nvim/lsp_client_settings.vim`` file comment-out/delete: - - * the entry line ``formatting = {format = cmp_format}`` - - * the 4 diagnostics lines starting with: ``sign define DiagnosticSign`` - -2. In ``vim/coc-settings.json`` delete the entry - ``suggest.completionItemKindLabels``. - -Not so easy fix: Patch your own font -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Install FontForge, for instance, on a Debian-based distro you can install this: -:: - - $ sudo apt install python3-fontforge - -Clone `NerdFonts `_ repository and -inside that directory run the following commands (This example assumes you are -patching Iosevka font, but you can patch one of your choice): -:: - - ./nerd-fonts$ ls -u ~/.local/share/fonts/Iosevka/v15.6.2/ttf-unhinted/iosevka-curly-slab-{regular,bold,italic,bolditalic,extended{,bold,italic,bolditalic}}.ttf | - while read file - do - fontforge -script ./font-patcher -c -out=$HOME/.local/share/fonts/"Iosevka Nerd Font"/ -ext=otf $file - done - -For other uses of the ``font-patcher`` tool you can read the `official -documentation -`_. +`Neovim/Vim README `_ .. class:: center diff --git a/nvim/README.rst b/nvim/README.rst new file mode 100644 index 0000000..7446d69 --- /dev/null +++ b/nvim/README.rst @@ -0,0 +1,72 @@ +Tuning up Neovim/Vim +==================== + +For using Vim with coc.nvim plugin, you need to install Node+npm. One way of +doing that is: +:: + + $ curl -sL install-node.now.sh/lts | bash -s -- --prefix ~/.local + + +Fonts with icon glyphs +---------------------- + +Some glyphs (icons) on Neovim/Vim might appear to be missing or broken!!! You +may need to use a patched font with the `NerdFonts `_ +project. + +Neovim/Vim config here has some automatic code completion. Instead of using +words or letters for representing the different kind of completion items, +this config uses nice icons like popular IDEs to give some familiar look. + +Easy fix +'''''''' + +Choose your favourite programming font (already patched) from `NerdFonts +`_, install it +on your system and set it as your terminal profile font. + +(Alternatively) +~~~~~~~~~~~~~~~ + +You may prefer not to have symbols at all. In that case, you have to: + +1. In ``nvim/lsp_client_settings.vim`` file comment-out/delete: + + * the entry line ``formatting = {format = cmp_format}`` + + * the 4 diagnostics lines starting with: ``sign define DiagnosticSign`` + +2. In ``vim/coc-settings.json`` delete the entry + ``suggest.completionItemKindLabels``. + +Not so easy fix: Patch your own font +'''''''''''''''''''''''''''''''''''' + +Install FontForge, for instance, on a Debian-based distro you can install this: +:: + + $ sudo apt install python3-fontforge + +Clone `NerdFonts `_ repository and +inside that directory run the following commands (This example assumes you are +patching Iosevka font, but you can patch one of your choice): +:: + + ./nerd-fonts$ ls -u ~/.local/share/fonts/Iosevka/v15.6.2/ttf-unhinted/iosevka-curly-slab-{regular,bold,italic,bolditalic,extended{,bold,italic,bolditalic}}.ttf | + while read file + do + fontforge -script ./font-patcher -c -out=$HOME/.local/share/fonts/"Iosevka Nerd Font"/ -ext=otf $file + done + +For other uses of the ``font-patcher`` tool you can read the `official +documentation +`_. + + +.. class:: center + +~ Made with ❤️ and 🧉 ~ + + +.. vim: se ft=rst diff --git a/vim/README.rst b/vim/README.rst new file mode 120000 index 0000000..79df693 --- /dev/null +++ b/vim/README.rst @@ -0,0 +1 @@ +../nvim/README.rst \ No newline at end of file From 9300e16d2e18e256e1d5b394f6e14d8cad77b908 Mon Sep 17 00:00:00 2001 From: Dionisio E Alonso Date: Sun, 7 Aug 2022 18:31:09 -0300 Subject: [PATCH 3/3] feat: Update diagnostics to use VSCode's codicons signs --- nvim/lsp_client_settings.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nvim/lsp_client_settings.vim b/nvim/lsp_client_settings.vim index b957f28..e3ef3c2 100644 --- a/nvim/lsp_client_settings.vim +++ b/nvim/lsp_client_settings.vim @@ -1,8 +1,8 @@ " nvim-lspconfig -sign define DiagnosticSignError text=✗ texthl=DiagnosticSignError linehl= numhl= -sign define DiagnosticSignWarn text=⚠ texthl=DiagnosticSignWarn linehl= numhl= -sign define DiagnosticSignInfo text=ℹ texthl=DiagnosticSignInfo linehl= numhl= -sign define DiagnosticSignHint text= texthl=DiagnosticSignHint linehl= numhl= +sign define DiagnosticSignError text= texthl=DiagnosticSignError linehl= numhl= +sign define DiagnosticSignWarn text= texthl=DiagnosticSignWarn linehl= numhl= +sign define DiagnosticSignInfo text= texthl=DiagnosticSignInfo linehl= numhl= +sign define DiagnosticSignHint text= texthl=DiagnosticSignHint linehl= numhl= set completeopt=menuone,noinsert,noselect