Skip to content

fedepujol/nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neovim Config

Hello there fellow stranger!

This is my custom PDE for Neovim! (it has been tested on Linux and Windows).

It provides the following:

  • Code Completion
  • File Explorer
  • Git Integration
  • Icons
  • LSP’s
  • Snippets
  • Statusline
  • Bufferline
  • Terminal Wrapper

and more!

Index

Requirements

  • Neovim v0.9.0 or nightly builds.
  • A Patched Font (Pick your font of choice from the NerdFonts guys)
  • Terminal emulator capable of using a patched font (For Windows you may try Windows Terminal).

If you're using this configuration with Neovim 0.6/0.6.1, you'll have to deal with the formatters outputing wrong eol on Windows files (fileformat=dos). There was an issue, which is already merge.

Installation

There is not a custom installation script (for now). To use this config follow steps:

  • Windows

    • Open a CMD/PowerShell/Bash
    • Navigate to ~\AppData\Local (C:\Users\your_user\AppData\Local)
    • Clone the repo with git clone https://github.com/fedepujol/nvim.git
  • Linux

    • Open a terminal (it depends on your distribution)
    • Navigate to ~/.config/
    • Clone the repo with git clone https://github.com/fedepujol/nvim.git

First Launch

On first launch, lazy package manager will download every plugin declared on the folder /lua/plugins and on /lua/core/lazy.lua file.

After this, re-open neovim. Then when you open a file, mason-lspconfig.nvim will download the LSP's configured in the file /lua/plugins/lspconfig.lua.

Lsp File
angularls html/typescript
bashls sh/bash
css css
html html
lua_ls lua
marksman markdown
prosemd_lsp markdown
rust-analyzer rust
tsserver typescript
vimlsp vim
yamllsp yaml

Language Server Protocol

Neovim has integrated a lot of cool features, one of them is the ability to interact with language servers to get some auto-completions, diagnostics and more based on the language you're using.

Install

To install a server you'll use the plugin mason.nvim and mason-lspconfig.nvim by typing:

:MasonInstall name-of-server

To view all available servers to download and managed the ones you've got:

:Mason

Configuration

I’ve included several lsp’s initializations (bash, css, html, etc.) in lua/plugins/lspconfig.lua.

These are maintained in nvim-lspconfig repo. There you'll find the configurations for several servers. If you want one, just take the config and paste it on the file. If you want more control, change the default values. A lot of the times, you'll have something like this:

require('lspconfig').tsserver.setup({})

The setup function already has default values, which in most cases works out of the box. Then install the server:

:MasonInstall tsserver

And you're ready to go!

Formatters and Linters

mason.nvim takes care of installing of configure the formatters and linters. Just type:

:Mason

And navigate to Formatters or Linters, select the ones you want and install them!

Plugin Folder Structure

This repo follows the plugin structure of lazy.nvim. If you want to know more visit the repo.

Settings

  • File: lua/core/settings.lua

Every setting you want to change about Neovim goes in here.

Keybindings

Neovim related keybindings

  • File: lua/core/mappings.lua

Pluggins keybindings:

  • File: lua/core/which-key.lua

Plugins

These are the plugins included:

Name
Comment
barbar
better-escape
bracketpair.nvim
colorizer
cosmos.nvim
dressing.nvim
fidget.nvim
formatter.nvim
gitsigns
heirline
lazy.nvim
lush
mason-lspconfig.nvim
mason.nvim
move.nvim
neo-tree
neodev.nvim
nvim-autopairs
nvim-cmp
nvim-dap
nvim-jdtls
nvim-lint
nvim-lspconfig
nvim-toggleterm
nvim-treesitter
nvim-ts-rainbow
nvim-web-devicons
package-info.nvim
playground
schemastore.nvim
shipwright
tabout.nvim
telescope
trouble.nvim
undotree
vim-visual-multi
vim-vsnip
which-key