Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/adityastomar67/NvStar

IDE Layer for Neovim, for simplicity lovers.
https://github.com/adityastomar67/NvStar

dotfiles formatters ide linters lua neovim neovim-config neovim-configuration neovim-lua neovim-setup nvim snippets vim vimrc vscode

Last synced: 3 months ago
JSON representation

IDE Layer for Neovim, for simplicity lovers.

Awesome Lists containing this project

README

        

NvSTAR


License


People


Stars


Forks


Watches


Last Updated

[![](https://img.shields.io/badge/Neovim-0.8+-blueviolet.svg?style=for-the-badge&logo=Neovim&color=302D41&logoColor=green)](https://github.com/neovim/neovim)

Personalized Development Environment โค๏ธ๐Ÿ‘จโ€๐Ÿ’ป


Brief description of how this configuration actually works. Hit the โญ button if you found this useful.

## โ” What is this
This is a v2 of my previous Neovim config - [Nvdots](https://github.com/adityastomar67/nvdots)

![Screenshot_Dashboard](https://user-images.githubusercontent.com/33474611/200270455-d1fc848e-3109-49f1-902a-a7909fb00661.png)
> For **Wallpaper**, Go to _[this](https://github.com/adityastomar67/Wallpapers)_
Terminal is **ST**, for config go _[here](https://github.com/adityastomar67/.dotfiles/tree/master/.config/st)_
For other stuff checkout my [Profile](https://github.com/adityastomar67)

Before we proceed, File Structure is like

If the reader is well versed or, has a general experience with shell scripting, Lua language or, know what they are doing then they may skip this section. But it advised to take a good understanding of the file structure before making any changes.

```
nvim
|
โ”œโ”€โ”€ bin
โ”‚ย ย  โ”œโ”€โ”€ friendly-snippets
โ”‚ย ย  โ”œโ”€โ”€ luasnip_snippets
โ”‚ย ย  โ””โ”€โ”€ snippets
โ”œโ”€โ”€ colors
โ”œโ”€โ”€ init.lua
โ”œโ”€โ”€ lua
โ”‚ย ย  โ”œโ”€โ”€ core
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ abbreviations.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ autocmds.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ colorscheme.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ colors.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ constants.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ maps.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ options.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ plugins.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ user.lua
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ utils
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ assistance.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ docker.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ init.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ notify.lua
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ toggle.lua
โ”‚ย ย  โ””โ”€โ”€ plug
โ”‚ย ย  โ”œโ”€โ”€ chatgpt.lua
โ”‚ย ย  โ”œโ”€โ”€ cheatsheet.lua
โ”‚ย ย  โ”œโ”€โ”€ cmp
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ dynamic.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ init.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ luasnip.lua
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ tabnine.lua
โ”‚ย ย  โ”œโ”€โ”€ colorizer.lua
โ”‚ย ย  โ”œโ”€โ”€ fzf.lua
โ”‚ย ย  โ”œโ”€โ”€ hydra
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ dap.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ git.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ init.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ options.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ spelling.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ telescope.lua
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ windows.lua
โ”‚ย ย  โ”œโ”€โ”€ init.lua
โ”‚ย ย  โ”œโ”€โ”€ lsp
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ diagnostics-highlight-override.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ init.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ lsp-installer.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ null-ls.lua
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ servers
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ bashls.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ clangd.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ emmet-ls.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ gopls.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ itex.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ jsonls.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ marksman.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ pyright.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ sqls.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ sumneko-lua.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ taplo.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ texlab.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ vimls.lua
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ yamlls.lua
โ”‚ย ย  โ”œโ”€โ”€ lspkind.lua
โ”‚ย ย  โ”œโ”€โ”€ mason.lua
โ”‚ย ย  โ”œโ”€โ”€ nvim-tree.lua
โ”‚ย ย  โ”œโ”€โ”€ other.lua
โ”‚ย ย  โ”œโ”€โ”€ regexp.lua
โ”‚ย ย  โ”œโ”€โ”€ tabout.lua
โ”‚ย ย  โ”œโ”€โ”€ telescope
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ init.lua
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ options.lua
โ”‚ย ย  โ”œโ”€โ”€ terminal.lua
โ”‚ย ย  โ”œโ”€โ”€ todo-comments.lua
โ”‚ย ย  โ”œโ”€โ”€ toggle.lua
โ”‚ย ย  โ”œโ”€โ”€ trouble.lua
โ”‚ย ย  โ”œโ”€โ”€ ts-context.lua
โ”‚ย ย  โ”œโ”€โ”€ ui
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ bufferline.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ dashboard.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ git-sign.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ init.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ minimap.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ noice.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ notify.lua
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ statusline.lua
โ”‚ย ย  โ””โ”€โ”€ whichkey.lua
โ””โ”€โ”€ plugin
```

## ๐Ÿš€ Install language servers

### Mostly available via npm
```bash
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 bash-language-server
```

> TIP: [No sudo on global npm install](https://github.com/sindresorhus/guides/blob/main/npm-global-without-sudo.md)

### Lua, Pyright, Deno, Gopls and rust-analyzer available in Arch/Manjaro repos
```bash
sudo pacman -S lua-language-server pyright deno rust-analyzer gopls shellcheck
```

> Check your package manager for availability if not on an Arch based distro -
_brew, apt_ etc.

## ๐Ÿ‘Œ Install formatters

[ prettier ](https://prettier.io/) with npm

```bash
npm i -g prettier
```

[ shfmt ](https://github.com/mvdan/sh) is in the AUR

```bash
sudo pacman -S shfmt # From the AUR
go install mvdan.cc/sh/v3/cmd/shfmt@latest # With the help of GO
```

[ stylua ](https://github.com/JohnnyMorganz/StyLua) is in the AUR

```bash
sudo pacman -S stylua
```

> Check your package manager for availability if not on an Arch based distro -
_brew, apt_ etc.

[autopep8](https://pypi.org/project/autopep8/) for python is in Manjaro/Arch
repos

```bash
sudo pacman -S autopep8
```

> Check your package manager for availability if not on an Arch based distro -
_brew, apt_ etc.

[yamlfmt](https://pypi.org/project/yamlfmt/) for yaml available with pip

```bash
sudo pip install yamlfmt
```

# ๐Ÿงจ Installation

```bash
# move to home dir
cd ~
# back up current config
cp -r ~/.config/nvim ~/.config/nvim.backup
# clone repository
git clone https://github.com/adityastomar67/nvstar.git ~/.config
# Launch nvim for the first time with this command to install plugins
nvim +PackerInstall
# exit nvim and Then compile the loader file
nvim +PackerCompile
```

## Additionals
### โญ Coding Assistance
With the help `a` you can get a list of all the available assistance actions for the current buffer.

#### [Github Copilot](https://github.com/features/copilot)
Provdes code samples and completions and easily be setted up using the command `Copilot auth`
#### [OpenAI Codex](https://openai.com/blog/openai-codex/)
It's a premium service, you need access from OpenAI. Then you need to copy your api key from dashboard and paste it into `$HOME/.config/openai-codex/env"`
#### And Others like [StackOverflow](https://github.com/samtay/so), [Cht.sh](https://cht.sh/), [Navi](https://github.com/denisidoro/navi), [Tokei](https://github.com/XAMPPRocky/tokei), [howdoi](https://github.com/gleitz/howdoi), [howto](https://github.com/blob42/howto), [Neural](https://github.com/dense-analysis/neural), [Shell-GPT](https://github.com/TheR1D/shell_gpt)

### โญ Adding custom Snippets

The conifg uses [ luasnip ](https://github.com/saadparwaiz1/cmp_luasnip) paired
with [friendly-snippets](https://github.com/adityastomar67/friendly-snippets), my own fork for VS Code style snippets.
You can add your own snippets to the config [ snippets directory ](./snippets).
You'll also need to edit the [snippets/package.json](./snippets/package.json) to
be able to load your snippets in the correct filetype.
One test snippet is included as an example.

## Plugins

For a list of plugins, see the [plugins file](./lua/core/plugins.lua).

## More Info

Looking for my `zsh` and other `cli` configs? See [Dotfiles](https://github.com/adityastomar67/.dotfiles)

## Resources and inspiration

[Nvim Lua guide](https://github.com/nanotee/nvim-lua-guide)

[Ben Frain has a nice setup](https://gist.github.com/benfrain/97f2b91087121b2d4ba0dcc4202d252f)

[Lunar Vim for inspiration](https://github.com/ChristianChiarulli/LunarVim)

[Ui Customization docs](https://github.com/neovim/nvim-lspconfig/wiki/UI-customization#change-diagnostic-symbols-in-the-sign-column-gutter)

[Lua for Programmers](https://ebens.me/post/lua-for-programmers-part-1/)

[LSP config](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md)

[Awesome list of plugins](https://github.com/rockerBOO/awesome-neovim)

[Plugin Finder](https://neovimcraft.com/)
Noting really, if you have (Neo)vim installed then you can just backup your previous config if any, then just clone this repo and create a symlink of this configuration to your ~/.config/nvim

**SUGGESTION**

* Font: Cascursive - Courtesy of [@sainnhe](https://github.com/sainnhe/icursive-nerd-font) **(You can find fonts inside my dotfiles repo)**
* [dot_files](https://github.com/adityastomar67/.dotfiles/)
* [Wallpaper](https://github.com/adityastomar67/Wallpapers)

## For Complete Automated install
Run this code snippet in your terminal **(Coming soon...)**
```bash
curl -sL https://bit.ly/Fresh-Install | sh -s -- --vim