lsp-error with clangd when opening a cpp file in Ubuntu

This page summarizes the projects mentioned and recommended in the original post on /r/neovim

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • vim-airline

    lean & mean status/tabline for vim that's light as air

  • -- Neovim configuration by Daniele Lupo (Jepessen) --- Require --- local utils = require('utils') --- Options --- -- Add number to rows utils.opt('o', 'number', true) -- Set indentation of files local indent = 2 utils.opt('b', 'expandtab', true) utils.opt('b', 'shiftwidth', indent) utils.opt('b', 'smartindent', true) utils.opt('b', 'tabstop', indent) utils.opt('b', 'autoindent', true) utils.opt('o', 'smarttab', true) utils.opt('b', 'softtabstop', indent) -- Enable the mouse utils.opt('o', 'mouse', 'a') -- Set nocompatible mode for more powerful commands utils.opt('o', 'compatible', false) -- Set some search options utils.opt('o', 'showmatch', true) utils.opt('o', 'ignorecase', true) utils.opt('o', 'hlsearch', true) utils.opt('o', 'incsearch', true) -- Set options for color scheme utils.opt('o', 'termguicolors', true) --- Keymappings --- -- Remap jj to escape in insert mode utils.map('i', 'jj', '') utils.map('n', 'JJJJ', '') -- Swap ; and : utils.map('n', ':', ';') utils.map('n', ';', ':') -- Start plugin section. Use this section in order to install new plugins to -- neovim. -- -- In order to install a new plugin, you need to put in this section the -- repository where it can be found, and then refresh the plugin list by -- installing them with the command: -- -- :PlugInstall -- Auto install vim-plug that's a plugin manager local vimplugrepository = '' local installpath = vim.fn.stdpath('config')..'/autoload' local vimpluginstallpath = installpath..'/plug.vim' local vimplugrepository = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' if vim.fn.empty(vim.fn.glob(vimpluginstallpath)) > 0 then vim.api.nvim_command('!curl -flo '..vimpluginstallpath..' --create-dirs '..vimplugrepository) vim.cmd 'autocmd VimEnter * PlugInstall' end local Plug = vim.fn['plug#'] -- Put plugins in this section. Define a Plug with the repository of the plugin that you want vim.call('plug#begin', installpath) -- Vim airline. This plugin creates a nice status bar with more features than -- standard one. Plug 'https://github.com/vim-airline/vim-airline' -- NerdTree is a plugin for showing a tree folder structure of the filesystem. Plug 'https://github.com/preservim/nerdtree' -- Vim color schemes Plug 'https://github.com/rafi/awesome-vim-colorschemes' -- Developer icons Plug 'https://github.com/ryanoasis/vim-devicons' -- Surrounding with parenthesis and xml tags with cs command and more Plug 'https://github.com/tpope/vim-surround' -- Show trailing whitespaces and use the command :StripWhitespace for removing -- them Plug 'https://github.com/ntpeters/vim-better-whitespace.git' -- Install the LSP server for configuring it with clangd for code completition -- in C++ Plug 'https://github.com/neovim/nvim-lspconfig' -- An interesting theme Plug 'https://github.com/Pocco81/Catppuccino.nvim' vim.call('plug#end') --- PLUGINS CONFIGURATION --- -- Nerdtree -- Configure keys so with ctrlf go to the tree, with ctrl+n open the tree, and -- ctrl+t toggle the tree utils.map('n', '', ':NERDTreeFocus') utils.map('n', '', ':NERDTree') utils.map('n', '', ':NERDTreeToggle') --- LSP CONFIG --- -- Main configuration local lspremapopts = { noremap = true, silent = true } vim.keymap.set('n', 'e', vim.diagnostic.open_float, lspremapopts) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, lspremapopts) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, lspremapopts) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, lspremapopts) -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(client, bufnr) -- Enable completition triggered by vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') -- Mappings -- See ':help vim.lsp.* local bufopts = { noremap = true, silent = true, bufnr = bufnr } vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) vim.keymap.set('n', 'wl', function () print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, bufopts) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) vim.keymap.set('n', 'gr', vim.lsp.buf.references.bufopts) vim.keymap.set('n', 'f', vim.lsp.buf.formatting, bufopts) end -- Now the servers must be defined and set. In order to load them it's -- convenient to define them in an array and use a loop. local servers = { 'pyright', 'clangd' } for _, lsp in pairs(servers) do require('lspconfig')[lsp].setup { on_attach = on_attach, flags = { debounce_text_changes = 150 } } end --- COLOR SCHEME --- vim.cmd[[colorscheme catppuccin]]

  • nerdtree

    A tree explorer plugin for vim.

  • -- Neovim configuration by Daniele Lupo (Jepessen) --- Require --- local utils = require('utils') --- Options --- -- Add number to rows utils.opt('o', 'number', true) -- Set indentation of files local indent = 2 utils.opt('b', 'expandtab', true) utils.opt('b', 'shiftwidth', indent) utils.opt('b', 'smartindent', true) utils.opt('b', 'tabstop', indent) utils.opt('b', 'autoindent', true) utils.opt('o', 'smarttab', true) utils.opt('b', 'softtabstop', indent) -- Enable the mouse utils.opt('o', 'mouse', 'a') -- Set nocompatible mode for more powerful commands utils.opt('o', 'compatible', false) -- Set some search options utils.opt('o', 'showmatch', true) utils.opt('o', 'ignorecase', true) utils.opt('o', 'hlsearch', true) utils.opt('o', 'incsearch', true) -- Set options for color scheme utils.opt('o', 'termguicolors', true) --- Keymappings --- -- Remap jj to escape in insert mode utils.map('i', 'jj', '') utils.map('n', 'JJJJ', '') -- Swap ; and : utils.map('n', ':', ';') utils.map('n', ';', ':') -- Start plugin section. Use this section in order to install new plugins to -- neovim. -- -- In order to install a new plugin, you need to put in this section the -- repository where it can be found, and then refresh the plugin list by -- installing them with the command: -- -- :PlugInstall -- Auto install vim-plug that's a plugin manager local vimplugrepository = '' local installpath = vim.fn.stdpath('config')..'/autoload' local vimpluginstallpath = installpath..'/plug.vim' local vimplugrepository = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' if vim.fn.empty(vim.fn.glob(vimpluginstallpath)) > 0 then vim.api.nvim_command('!curl -flo '..vimpluginstallpath..' --create-dirs '..vimplugrepository) vim.cmd 'autocmd VimEnter * PlugInstall' end local Plug = vim.fn['plug#'] -- Put plugins in this section. Define a Plug with the repository of the plugin that you want vim.call('plug#begin', installpath) -- Vim airline. This plugin creates a nice status bar with more features than -- standard one. Plug 'https://github.com/vim-airline/vim-airline' -- NerdTree is a plugin for showing a tree folder structure of the filesystem. Plug 'https://github.com/preservim/nerdtree' -- Vim color schemes Plug 'https://github.com/rafi/awesome-vim-colorschemes' -- Developer icons Plug 'https://github.com/ryanoasis/vim-devicons' -- Surrounding with parenthesis and xml tags with cs command and more Plug 'https://github.com/tpope/vim-surround' -- Show trailing whitespaces and use the command :StripWhitespace for removing -- them Plug 'https://github.com/ntpeters/vim-better-whitespace.git' -- Install the LSP server for configuring it with clangd for code completition -- in C++ Plug 'https://github.com/neovim/nvim-lspconfig' -- An interesting theme Plug 'https://github.com/Pocco81/Catppuccino.nvim' vim.call('plug#end') --- PLUGINS CONFIGURATION --- -- Nerdtree -- Configure keys so with ctrlf go to the tree, with ctrl+n open the tree, and -- ctrl+t toggle the tree utils.map('n', '', ':NERDTreeFocus') utils.map('n', '', ':NERDTree') utils.map('n', '', ':NERDTreeToggle') --- LSP CONFIG --- -- Main configuration local lspremapopts = { noremap = true, silent = true } vim.keymap.set('n', 'e', vim.diagnostic.open_float, lspremapopts) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, lspremapopts) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, lspremapopts) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, lspremapopts) -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(client, bufnr) -- Enable completition triggered by vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') -- Mappings -- See ':help vim.lsp.* local bufopts = { noremap = true, silent = true, bufnr = bufnr } vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) vim.keymap.set('n', 'wl', function () print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, bufopts) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) vim.keymap.set('n', 'gr', vim.lsp.buf.references.bufopts) vim.keymap.set('n', 'f', vim.lsp.buf.formatting, bufopts) end -- Now the servers must be defined and set. In order to load them it's -- convenient to define them in an array and use a loop. local servers = { 'pyright', 'clangd' } for _, lsp in pairs(servers) do require('lspconfig')[lsp].setup { on_attach = on_attach, flags = { debounce_text_changes = 150 } } end --- COLOR SCHEME --- vim.cmd[[colorscheme catppuccin]]

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • awesome-vim-colorschemes

    Collection of awesome color schemes for Neo/vim, merged for quick use.

  • -- Neovim configuration by Daniele Lupo (Jepessen) --- Require --- local utils = require('utils') --- Options --- -- Add number to rows utils.opt('o', 'number', true) -- Set indentation of files local indent = 2 utils.opt('b', 'expandtab', true) utils.opt('b', 'shiftwidth', indent) utils.opt('b', 'smartindent', true) utils.opt('b', 'tabstop', indent) utils.opt('b', 'autoindent', true) utils.opt('o', 'smarttab', true) utils.opt('b', 'softtabstop', indent) -- Enable the mouse utils.opt('o', 'mouse', 'a') -- Set nocompatible mode for more powerful commands utils.opt('o', 'compatible', false) -- Set some search options utils.opt('o', 'showmatch', true) utils.opt('o', 'ignorecase', true) utils.opt('o', 'hlsearch', true) utils.opt('o', 'incsearch', true) -- Set options for color scheme utils.opt('o', 'termguicolors', true) --- Keymappings --- -- Remap jj to escape in insert mode utils.map('i', 'jj', '') utils.map('n', 'JJJJ', '') -- Swap ; and : utils.map('n', ':', ';') utils.map('n', ';', ':') -- Start plugin section. Use this section in order to install new plugins to -- neovim. -- -- In order to install a new plugin, you need to put in this section the -- repository where it can be found, and then refresh the plugin list by -- installing them with the command: -- -- :PlugInstall -- Auto install vim-plug that's a plugin manager local vimplugrepository = '' local installpath = vim.fn.stdpath('config')..'/autoload' local vimpluginstallpath = installpath..'/plug.vim' local vimplugrepository = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' if vim.fn.empty(vim.fn.glob(vimpluginstallpath)) > 0 then vim.api.nvim_command('!curl -flo '..vimpluginstallpath..' --create-dirs '..vimplugrepository) vim.cmd 'autocmd VimEnter * PlugInstall' end local Plug = vim.fn['plug#'] -- Put plugins in this section. Define a Plug with the repository of the plugin that you want vim.call('plug#begin', installpath) -- Vim airline. This plugin creates a nice status bar with more features than -- standard one. Plug 'https://github.com/vim-airline/vim-airline' -- NerdTree is a plugin for showing a tree folder structure of the filesystem. Plug 'https://github.com/preservim/nerdtree' -- Vim color schemes Plug 'https://github.com/rafi/awesome-vim-colorschemes' -- Developer icons Plug 'https://github.com/ryanoasis/vim-devicons' -- Surrounding with parenthesis and xml tags with cs command and more Plug 'https://github.com/tpope/vim-surround' -- Show trailing whitespaces and use the command :StripWhitespace for removing -- them Plug 'https://github.com/ntpeters/vim-better-whitespace.git' -- Install the LSP server for configuring it with clangd for code completition -- in C++ Plug 'https://github.com/neovim/nvim-lspconfig' -- An interesting theme Plug 'https://github.com/Pocco81/Catppuccino.nvim' vim.call('plug#end') --- PLUGINS CONFIGURATION --- -- Nerdtree -- Configure keys so with ctrlf go to the tree, with ctrl+n open the tree, and -- ctrl+t toggle the tree utils.map('n', '', ':NERDTreeFocus') utils.map('n', '', ':NERDTree') utils.map('n', '', ':NERDTreeToggle') --- LSP CONFIG --- -- Main configuration local lspremapopts = { noremap = true, silent = true } vim.keymap.set('n', 'e', vim.diagnostic.open_float, lspremapopts) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, lspremapopts) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, lspremapopts) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, lspremapopts) -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(client, bufnr) -- Enable completition triggered by vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') -- Mappings -- See ':help vim.lsp.* local bufopts = { noremap = true, silent = true, bufnr = bufnr } vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) vim.keymap.set('n', 'wl', function () print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, bufopts) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) vim.keymap.set('n', 'gr', vim.lsp.buf.references.bufopts) vim.keymap.set('n', 'f', vim.lsp.buf.formatting, bufopts) end -- Now the servers must be defined and set. In order to load them it's -- convenient to define them in an array and use a loop. local servers = { 'pyright', 'clangd' } for _, lsp in pairs(servers) do require('lspconfig')[lsp].setup { on_attach = on_attach, flags = { debounce_text_changes = 150 } } end --- COLOR SCHEME --- vim.cmd[[colorscheme catppuccin]]

  • vim-devicons

    Adds file type icons to Vim plugins such as: NERDTree, vim-airline, CtrlP, unite, Denite, lightline, vim-startify and many more

  • -- Neovim configuration by Daniele Lupo (Jepessen) --- Require --- local utils = require('utils') --- Options --- -- Add number to rows utils.opt('o', 'number', true) -- Set indentation of files local indent = 2 utils.opt('b', 'expandtab', true) utils.opt('b', 'shiftwidth', indent) utils.opt('b', 'smartindent', true) utils.opt('b', 'tabstop', indent) utils.opt('b', 'autoindent', true) utils.opt('o', 'smarttab', true) utils.opt('b', 'softtabstop', indent) -- Enable the mouse utils.opt('o', 'mouse', 'a') -- Set nocompatible mode for more powerful commands utils.opt('o', 'compatible', false) -- Set some search options utils.opt('o', 'showmatch', true) utils.opt('o', 'ignorecase', true) utils.opt('o', 'hlsearch', true) utils.opt('o', 'incsearch', true) -- Set options for color scheme utils.opt('o', 'termguicolors', true) --- Keymappings --- -- Remap jj to escape in insert mode utils.map('i', 'jj', '') utils.map('n', 'JJJJ', '') -- Swap ; and : utils.map('n', ':', ';') utils.map('n', ';', ':') -- Start plugin section. Use this section in order to install new plugins to -- neovim. -- -- In order to install a new plugin, you need to put in this section the -- repository where it can be found, and then refresh the plugin list by -- installing them with the command: -- -- :PlugInstall -- Auto install vim-plug that's a plugin manager local vimplugrepository = '' local installpath = vim.fn.stdpath('config')..'/autoload' local vimpluginstallpath = installpath..'/plug.vim' local vimplugrepository = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' if vim.fn.empty(vim.fn.glob(vimpluginstallpath)) > 0 then vim.api.nvim_command('!curl -flo '..vimpluginstallpath..' --create-dirs '..vimplugrepository) vim.cmd 'autocmd VimEnter * PlugInstall' end local Plug = vim.fn['plug#'] -- Put plugins in this section. Define a Plug with the repository of the plugin that you want vim.call('plug#begin', installpath) -- Vim airline. This plugin creates a nice status bar with more features than -- standard one. Plug 'https://github.com/vim-airline/vim-airline' -- NerdTree is a plugin for showing a tree folder structure of the filesystem. Plug 'https://github.com/preservim/nerdtree' -- Vim color schemes Plug 'https://github.com/rafi/awesome-vim-colorschemes' -- Developer icons Plug 'https://github.com/ryanoasis/vim-devicons' -- Surrounding with parenthesis and xml tags with cs command and more Plug 'https://github.com/tpope/vim-surround' -- Show trailing whitespaces and use the command :StripWhitespace for removing -- them Plug 'https://github.com/ntpeters/vim-better-whitespace.git' -- Install the LSP server for configuring it with clangd for code completition -- in C++ Plug 'https://github.com/neovim/nvim-lspconfig' -- An interesting theme Plug 'https://github.com/Pocco81/Catppuccino.nvim' vim.call('plug#end') --- PLUGINS CONFIGURATION --- -- Nerdtree -- Configure keys so with ctrlf go to the tree, with ctrl+n open the tree, and -- ctrl+t toggle the tree utils.map('n', '', ':NERDTreeFocus') utils.map('n', '', ':NERDTree') utils.map('n', '', ':NERDTreeToggle') --- LSP CONFIG --- -- Main configuration local lspremapopts = { noremap = true, silent = true } vim.keymap.set('n', 'e', vim.diagnostic.open_float, lspremapopts) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, lspremapopts) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, lspremapopts) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, lspremapopts) -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(client, bufnr) -- Enable completition triggered by vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') -- Mappings -- See ':help vim.lsp.* local bufopts = { noremap = true, silent = true, bufnr = bufnr } vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) vim.keymap.set('n', 'wl', function () print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, bufopts) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) vim.keymap.set('n', 'gr', vim.lsp.buf.references.bufopts) vim.keymap.set('n', 'f', vim.lsp.buf.formatting, bufopts) end -- Now the servers must be defined and set. In order to load them it's -- convenient to define them in an array and use a loop. local servers = { 'pyright', 'clangd' } for _, lsp in pairs(servers) do require('lspconfig')[lsp].setup { on_attach = on_attach, flags = { debounce_text_changes = 150 } } end --- COLOR SCHEME --- vim.cmd[[colorscheme catppuccin]]

  • vim-surround

    surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease

  • -- Neovim configuration by Daniele Lupo (Jepessen) --- Require --- local utils = require('utils') --- Options --- -- Add number to rows utils.opt('o', 'number', true) -- Set indentation of files local indent = 2 utils.opt('b', 'expandtab', true) utils.opt('b', 'shiftwidth', indent) utils.opt('b', 'smartindent', true) utils.opt('b', 'tabstop', indent) utils.opt('b', 'autoindent', true) utils.opt('o', 'smarttab', true) utils.opt('b', 'softtabstop', indent) -- Enable the mouse utils.opt('o', 'mouse', 'a') -- Set nocompatible mode for more powerful commands utils.opt('o', 'compatible', false) -- Set some search options utils.opt('o', 'showmatch', true) utils.opt('o', 'ignorecase', true) utils.opt('o', 'hlsearch', true) utils.opt('o', 'incsearch', true) -- Set options for color scheme utils.opt('o', 'termguicolors', true) --- Keymappings --- -- Remap jj to escape in insert mode utils.map('i', 'jj', '') utils.map('n', 'JJJJ', '') -- Swap ; and : utils.map('n', ':', ';') utils.map('n', ';', ':') -- Start plugin section. Use this section in order to install new plugins to -- neovim. -- -- In order to install a new plugin, you need to put in this section the -- repository where it can be found, and then refresh the plugin list by -- installing them with the command: -- -- :PlugInstall -- Auto install vim-plug that's a plugin manager local vimplugrepository = '' local installpath = vim.fn.stdpath('config')..'/autoload' local vimpluginstallpath = installpath..'/plug.vim' local vimplugrepository = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' if vim.fn.empty(vim.fn.glob(vimpluginstallpath)) > 0 then vim.api.nvim_command('!curl -flo '..vimpluginstallpath..' --create-dirs '..vimplugrepository) vim.cmd 'autocmd VimEnter * PlugInstall' end local Plug = vim.fn['plug#'] -- Put plugins in this section. Define a Plug with the repository of the plugin that you want vim.call('plug#begin', installpath) -- Vim airline. This plugin creates a nice status bar with more features than -- standard one. Plug 'https://github.com/vim-airline/vim-airline' -- NerdTree is a plugin for showing a tree folder structure of the filesystem. Plug 'https://github.com/preservim/nerdtree' -- Vim color schemes Plug 'https://github.com/rafi/awesome-vim-colorschemes' -- Developer icons Plug 'https://github.com/ryanoasis/vim-devicons' -- Surrounding with parenthesis and xml tags with cs command and more Plug 'https://github.com/tpope/vim-surround' -- Show trailing whitespaces and use the command :StripWhitespace for removing -- them Plug 'https://github.com/ntpeters/vim-better-whitespace.git' -- Install the LSP server for configuring it with clangd for code completition -- in C++ Plug 'https://github.com/neovim/nvim-lspconfig' -- An interesting theme Plug 'https://github.com/Pocco81/Catppuccino.nvim' vim.call('plug#end') --- PLUGINS CONFIGURATION --- -- Nerdtree -- Configure keys so with ctrlf go to the tree, with ctrl+n open the tree, and -- ctrl+t toggle the tree utils.map('n', '', ':NERDTreeFocus') utils.map('n', '', ':NERDTree') utils.map('n', '', ':NERDTreeToggle') --- LSP CONFIG --- -- Main configuration local lspremapopts = { noremap = true, silent = true } vim.keymap.set('n', 'e', vim.diagnostic.open_float, lspremapopts) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, lspremapopts) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, lspremapopts) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, lspremapopts) -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(client, bufnr) -- Enable completition triggered by vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') -- Mappings -- See ':help vim.lsp.* local bufopts = { noremap = true, silent = true, bufnr = bufnr } vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) vim.keymap.set('n', 'wl', function () print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, bufopts) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) vim.keymap.set('n', 'gr', vim.lsp.buf.references.bufopts) vim.keymap.set('n', 'f', vim.lsp.buf.formatting, bufopts) end -- Now the servers must be defined and set. In order to load them it's -- convenient to define them in an array and use a loop. local servers = { 'pyright', 'clangd' } for _, lsp in pairs(servers) do require('lspconfig')[lsp].setup { on_attach = on_attach, flags = { debounce_text_changes = 150 } } end --- COLOR SCHEME --- vim.cmd[[colorscheme catppuccin]]

  • vim-better-whitespace

    Better whitespace highlighting for Vim

  • -- Neovim configuration by Daniele Lupo (Jepessen) --- Require --- local utils = require('utils') --- Options --- -- Add number to rows utils.opt('o', 'number', true) -- Set indentation of files local indent = 2 utils.opt('b', 'expandtab', true) utils.opt('b', 'shiftwidth', indent) utils.opt('b', 'smartindent', true) utils.opt('b', 'tabstop', indent) utils.opt('b', 'autoindent', true) utils.opt('o', 'smarttab', true) utils.opt('b', 'softtabstop', indent) -- Enable the mouse utils.opt('o', 'mouse', 'a') -- Set nocompatible mode for more powerful commands utils.opt('o', 'compatible', false) -- Set some search options utils.opt('o', 'showmatch', true) utils.opt('o', 'ignorecase', true) utils.opt('o', 'hlsearch', true) utils.opt('o', 'incsearch', true) -- Set options for color scheme utils.opt('o', 'termguicolors', true) --- Keymappings --- -- Remap jj to escape in insert mode utils.map('i', 'jj', '') utils.map('n', 'JJJJ', '') -- Swap ; and : utils.map('n', ':', ';') utils.map('n', ';', ':') -- Start plugin section. Use this section in order to install new plugins to -- neovim. -- -- In order to install a new plugin, you need to put in this section the -- repository where it can be found, and then refresh the plugin list by -- installing them with the command: -- -- :PlugInstall -- Auto install vim-plug that's a plugin manager local vimplugrepository = '' local installpath = vim.fn.stdpath('config')..'/autoload' local vimpluginstallpath = installpath..'/plug.vim' local vimplugrepository = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' if vim.fn.empty(vim.fn.glob(vimpluginstallpath)) > 0 then vim.api.nvim_command('!curl -flo '..vimpluginstallpath..' --create-dirs '..vimplugrepository) vim.cmd 'autocmd VimEnter * PlugInstall' end local Plug = vim.fn['plug#'] -- Put plugins in this section. Define a Plug with the repository of the plugin that you want vim.call('plug#begin', installpath) -- Vim airline. This plugin creates a nice status bar with more features than -- standard one. Plug 'https://github.com/vim-airline/vim-airline' -- NerdTree is a plugin for showing a tree folder structure of the filesystem. Plug 'https://github.com/preservim/nerdtree' -- Vim color schemes Plug 'https://github.com/rafi/awesome-vim-colorschemes' -- Developer icons Plug 'https://github.com/ryanoasis/vim-devicons' -- Surrounding with parenthesis and xml tags with cs command and more Plug 'https://github.com/tpope/vim-surround' -- Show trailing whitespaces and use the command :StripWhitespace for removing -- them Plug 'https://github.com/ntpeters/vim-better-whitespace.git' -- Install the LSP server for configuring it with clangd for code completition -- in C++ Plug 'https://github.com/neovim/nvim-lspconfig' -- An interesting theme Plug 'https://github.com/Pocco81/Catppuccino.nvim' vim.call('plug#end') --- PLUGINS CONFIGURATION --- -- Nerdtree -- Configure keys so with ctrlf go to the tree, with ctrl+n open the tree, and -- ctrl+t toggle the tree utils.map('n', '', ':NERDTreeFocus') utils.map('n', '', ':NERDTree') utils.map('n', '', ':NERDTreeToggle') --- LSP CONFIG --- -- Main configuration local lspremapopts = { noremap = true, silent = true } vim.keymap.set('n', 'e', vim.diagnostic.open_float, lspremapopts) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, lspremapopts) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, lspremapopts) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, lspremapopts) -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(client, bufnr) -- Enable completition triggered by vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') -- Mappings -- See ':help vim.lsp.* local bufopts = { noremap = true, silent = true, bufnr = bufnr } vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) vim.keymap.set('n', 'wl', function () print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, bufopts) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) vim.keymap.set('n', 'gr', vim.lsp.buf.references.bufopts) vim.keymap.set('n', 'f', vim.lsp.buf.formatting, bufopts) end -- Now the servers must be defined and set. In order to load them it's -- convenient to define them in an array and use a loop. local servers = { 'pyright', 'clangd' } for _, lsp in pairs(servers) do require('lspconfig')[lsp].setup { on_attach = on_attach, flags = { debounce_text_changes = 150 } } end --- COLOR SCHEME --- vim.cmd[[colorscheme catppuccin]]

  • nvim-lspconfig

    Quickstart configs for Nvim LSP

  • -- Neovim configuration by Daniele Lupo (Jepessen) --- Require --- local utils = require('utils') --- Options --- -- Add number to rows utils.opt('o', 'number', true) -- Set indentation of files local indent = 2 utils.opt('b', 'expandtab', true) utils.opt('b', 'shiftwidth', indent) utils.opt('b', 'smartindent', true) utils.opt('b', 'tabstop', indent) utils.opt('b', 'autoindent', true) utils.opt('o', 'smarttab', true) utils.opt('b', 'softtabstop', indent) -- Enable the mouse utils.opt('o', 'mouse', 'a') -- Set nocompatible mode for more powerful commands utils.opt('o', 'compatible', false) -- Set some search options utils.opt('o', 'showmatch', true) utils.opt('o', 'ignorecase', true) utils.opt('o', 'hlsearch', true) utils.opt('o', 'incsearch', true) -- Set options for color scheme utils.opt('o', 'termguicolors', true) --- Keymappings --- -- Remap jj to escape in insert mode utils.map('i', 'jj', '') utils.map('n', 'JJJJ', '') -- Swap ; and : utils.map('n', ':', ';') utils.map('n', ';', ':') -- Start plugin section. Use this section in order to install new plugins to -- neovim. -- -- In order to install a new plugin, you need to put in this section the -- repository where it can be found, and then refresh the plugin list by -- installing them with the command: -- -- :PlugInstall -- Auto install vim-plug that's a plugin manager local vimplugrepository = '' local installpath = vim.fn.stdpath('config')..'/autoload' local vimpluginstallpath = installpath..'/plug.vim' local vimplugrepository = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' if vim.fn.empty(vim.fn.glob(vimpluginstallpath)) > 0 then vim.api.nvim_command('!curl -flo '..vimpluginstallpath..' --create-dirs '..vimplugrepository) vim.cmd 'autocmd VimEnter * PlugInstall' end local Plug = vim.fn['plug#'] -- Put plugins in this section. Define a Plug with the repository of the plugin that you want vim.call('plug#begin', installpath) -- Vim airline. This plugin creates a nice status bar with more features than -- standard one. Plug 'https://github.com/vim-airline/vim-airline' -- NerdTree is a plugin for showing a tree folder structure of the filesystem. Plug 'https://github.com/preservim/nerdtree' -- Vim color schemes Plug 'https://github.com/rafi/awesome-vim-colorschemes' -- Developer icons Plug 'https://github.com/ryanoasis/vim-devicons' -- Surrounding with parenthesis and xml tags with cs command and more Plug 'https://github.com/tpope/vim-surround' -- Show trailing whitespaces and use the command :StripWhitespace for removing -- them Plug 'https://github.com/ntpeters/vim-better-whitespace.git' -- Install the LSP server for configuring it with clangd for code completition -- in C++ Plug 'https://github.com/neovim/nvim-lspconfig' -- An interesting theme Plug 'https://github.com/Pocco81/Catppuccino.nvim' vim.call('plug#end') --- PLUGINS CONFIGURATION --- -- Nerdtree -- Configure keys so with ctrlf go to the tree, with ctrl+n open the tree, and -- ctrl+t toggle the tree utils.map('n', '', ':NERDTreeFocus') utils.map('n', '', ':NERDTree') utils.map('n', '', ':NERDTreeToggle') --- LSP CONFIG --- -- Main configuration local lspremapopts = { noremap = true, silent = true } vim.keymap.set('n', 'e', vim.diagnostic.open_float, lspremapopts) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, lspremapopts) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, lspremapopts) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, lspremapopts) -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(client, bufnr) -- Enable completition triggered by vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') -- Mappings -- See ':help vim.lsp.* local bufopts = { noremap = true, silent = true, bufnr = bufnr } vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) vim.keymap.set('n', 'wl', function () print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, bufopts) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) vim.keymap.set('n', 'gr', vim.lsp.buf.references.bufopts) vim.keymap.set('n', 'f', vim.lsp.buf.formatting, bufopts) end -- Now the servers must be defined and set. In order to load them it's -- convenient to define them in an array and use a loop. local servers = { 'pyright', 'clangd' } for _, lsp in pairs(servers) do require('lspconfig')[lsp].setup { on_attach = on_attach, flags = { debounce_text_changes = 150 } } end --- COLOR SCHEME --- vim.cmd[[colorscheme catppuccin]]

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • Catppuccino.nvim

    Discontinued 🍨 Catppuccin theme for NeoVim [Moved to: https://github.com/catppuccin/nvim]

  • -- Neovim configuration by Daniele Lupo (Jepessen) --- Require --- local utils = require('utils') --- Options --- -- Add number to rows utils.opt('o', 'number', true) -- Set indentation of files local indent = 2 utils.opt('b', 'expandtab', true) utils.opt('b', 'shiftwidth', indent) utils.opt('b', 'smartindent', true) utils.opt('b', 'tabstop', indent) utils.opt('b', 'autoindent', true) utils.opt('o', 'smarttab', true) utils.opt('b', 'softtabstop', indent) -- Enable the mouse utils.opt('o', 'mouse', 'a') -- Set nocompatible mode for more powerful commands utils.opt('o', 'compatible', false) -- Set some search options utils.opt('o', 'showmatch', true) utils.opt('o', 'ignorecase', true) utils.opt('o', 'hlsearch', true) utils.opt('o', 'incsearch', true) -- Set options for color scheme utils.opt('o', 'termguicolors', true) --- Keymappings --- -- Remap jj to escape in insert mode utils.map('i', 'jj', '') utils.map('n', 'JJJJ', '') -- Swap ; and : utils.map('n', ':', ';') utils.map('n', ';', ':') -- Start plugin section. Use this section in order to install new plugins to -- neovim. -- -- In order to install a new plugin, you need to put in this section the -- repository where it can be found, and then refresh the plugin list by -- installing them with the command: -- -- :PlugInstall -- Auto install vim-plug that's a plugin manager local vimplugrepository = '' local installpath = vim.fn.stdpath('config')..'/autoload' local vimpluginstallpath = installpath..'/plug.vim' local vimplugrepository = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' if vim.fn.empty(vim.fn.glob(vimpluginstallpath)) > 0 then vim.api.nvim_command('!curl -flo '..vimpluginstallpath..' --create-dirs '..vimplugrepository) vim.cmd 'autocmd VimEnter * PlugInstall' end local Plug = vim.fn['plug#'] -- Put plugins in this section. Define a Plug with the repository of the plugin that you want vim.call('plug#begin', installpath) -- Vim airline. This plugin creates a nice status bar with more features than -- standard one. Plug 'https://github.com/vim-airline/vim-airline' -- NerdTree is a plugin for showing a tree folder structure of the filesystem. Plug 'https://github.com/preservim/nerdtree' -- Vim color schemes Plug 'https://github.com/rafi/awesome-vim-colorschemes' -- Developer icons Plug 'https://github.com/ryanoasis/vim-devicons' -- Surrounding with parenthesis and xml tags with cs command and more Plug 'https://github.com/tpope/vim-surround' -- Show trailing whitespaces and use the command :StripWhitespace for removing -- them Plug 'https://github.com/ntpeters/vim-better-whitespace.git' -- Install the LSP server for configuring it with clangd for code completition -- in C++ Plug 'https://github.com/neovim/nvim-lspconfig' -- An interesting theme Plug 'https://github.com/Pocco81/Catppuccino.nvim' vim.call('plug#end') --- PLUGINS CONFIGURATION --- -- Nerdtree -- Configure keys so with ctrlf go to the tree, with ctrl+n open the tree, and -- ctrl+t toggle the tree utils.map('n', '', ':NERDTreeFocus') utils.map('n', '', ':NERDTree') utils.map('n', '', ':NERDTreeToggle') --- LSP CONFIG --- -- Main configuration local lspremapopts = { noremap = true, silent = true } vim.keymap.set('n', 'e', vim.diagnostic.open_float, lspremapopts) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, lspremapopts) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, lspremapopts) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, lspremapopts) -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(client, bufnr) -- Enable completition triggered by vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') -- Mappings -- See ':help vim.lsp.* local bufopts = { noremap = true, silent = true, bufnr = bufnr } vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) vim.keymap.set('n', 'wl', function () print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, bufopts) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) vim.keymap.set('n', 'gr', vim.lsp.buf.references.bufopts) vim.keymap.set('n', 'f', vim.lsp.buf.formatting, bufopts) end -- Now the servers must be defined and set. In order to load them it's -- convenient to define them in an array and use a loop. local servers = { 'pyright', 'clangd' } for _, lsp in pairs(servers) do require('lspconfig')[lsp].setup { on_attach = on_attach, flags = { debounce_text_changes = 150 } } end --- COLOR SCHEME --- vim.cmd[[colorscheme catppuccin]]

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts