Git Product home page Git Product logo

nvim's Introduction

Leaving the CoC behind.

Screenshot kitty terminal with TokyoNight terminal theme and Victor Mono nerd font.

My config for Nvim using native LSP with some sane defaults and settings, mainly aimed at web development but ready to go with Python, Rust, Golang, Deno and Lua.

Uses the latest 0.7+ Neovim

Clone the repository into ~/.config/nvim

git clone https://github.com/bushblade/nvim.git ~/.config/nvim

Install Packer

Packer Neovim plugin manager

git clone https://github.com/wbthomason/packer.nvim\
 ~/.local/share/nvim/site/pack/packer/start/packer.nvim

Install language servers

Most available via npm

npm install -g typescript typescript-language-server vscode-langservers-extracted vls @tailwindcss/language-server yaml-language-server @prisma/language-server emmet-ls neovim graphql-language-service-cli graphql-language-service-server @astrojs/language-server

TIP: No sudo on global npm install

Lua, Pyright, Deno, Gopls and rust-analyzer available in Arch/Manjaro repos

Check your package manager for availability if not on an Arch based distro - brew, apt etc.

sudo pacman -S lua-language-server pyright deno rust-analyzer gopls

Install formatters

prettier with npm

npm i -g prettier

stylua is in the AUR

pamac install stylua

Check your package manager for availability if not on an Arch based distro - brew, apt etc.

autopep8 for python is in Manjaro/Arch repos

sudo pacman -S autopep8

Check your package manager for availability if not on an Arch based distro - brew, apt etc.

yamlfmt for yaml available with pip

sudo pip install yamlfmt

Launch Nvim

On the first run of nvim be sure to install plugins.

:PackerInstall

Then compile loader file.

:PackerCompile

Note: Installing Firenvim

Run this command in nvim to install FireNvim in your browser.

:call firenvim#install(0)

or install the FireFox extension or the Chrome extension

Adding custom Snippets

The conifg uses luasnip paired with rafamadriz/friendly-snippets for VS Code style snippets. You can add your own snippets to the config snippets directory . You'll also need to edit the snippets/package.json to be able to load your snippets in the correct filetype. One test snippet is included as an example.

Currently installed plugins

  1. wbthomason/packer.nvim - Plugin manager

  2. neovim/nvim-lspconfig - LSP

  3. nvim-telescope/telescope.nvim - Fuzzy find anything

  4. nvim-treesitter/nvim-treesitter Language parsing for highlighting and more

  5. hoob3rt/lualine.nvim Status line

  6. kyazdani42/nvim-web-devicons Icons

  7. glacambre/firenvim Embed nvim in firefox or chrome

  8. hrsh7th/nvim-cmp Auto completions, suggestions and imports

    Source completion includes:

    1. hrsh7th/cmp-cmdline command line
    2. hrsh7th/cmp-buffer buffer completions
    3. hrsh7th/cmp-nvim-lua nvim config completions
    4. hrsh7th/cmp-nvim-lsp lsp completions
    5. hrsh7th/cmp-path file path completions
    6. saadparwaiz1/cmp_luasnip snippets completions
    7. L3MON4D3/LuaSnip Snippets
    8. rafamadriz/friendly-snippets
  9. tpope/vim-fugitive Git tools

  10. tpope/vim-surround Surroundings pairs mappings

  11. numToStr/Comment.nvim Vim style commenting

  12. knubie/vim-kitty-navigator Move between Nvim and Kitty splits

  13. windwp/nvim-ts-autotag HTML/JSX auto tags

  14. windwp/nvim-autopairs Auto bracket and quote pairs

  15. windwp/nvim-spectre Project wide find and replace

  16. mhartington/formatter.nvim Formatting

  17. airblade/vim-gitgutter Git status in the sign column

  18. leafOfTree/vim-matchtag Highlight matching tag in HTML/JSX

  19. phaazon/hop.nvim Jump anywhwere in your code

  20. kyazdani42/nvim-tree.lua File tree

  21. JoosepAlviste/nvim-ts-context-commentstring Better commenting based on file type

  22. onsails/lspkind-nvim Icons in completion

  23. folke/tokyonight.nvim Theme

  24. folke/trouble.nvim Show the problems in your code

  25. folke/which-key.nvim Keymap helper

  26. folke/todo-comments.nvim Highlight and search project todos and notes

  27. norcalli/nvim-colorizer.lua Display the colour of your hex/rgb/hsl value

  28. kevinoid/vim-jsonc Comments in json filetype

  29. akinsho/bufferline.nvim Buffers in tabs

  30. weilbith/nvim-code-action-menu Better code actions

  31. delphinus/vim-firestore Syntax highlighting and completion for Firebase rules

  32. rmagatti/auto-session Session management

  33. andweeb/presence.nvim Rich presence in Discord

  34. goolord/alpha-nvim Dashboard

  35. mbbill/undotree Undotree

Resources and inspiration

Nvim Lua guide

Ben Frain has a nice setup

Lunar Vim for inspiration

Ui Customization docs

Lua for Programmers

LSP config

Awesome list of plugins

Plugin Finder

nvim's People

Contributors

bushblade avatar shivamjoker avatar l-bowman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.