All Projects → Neelfrost → nvim-config

Neelfrost / nvim-config

Licence: MIT license
Personal neovim configuration⚡ Fully configured for LaTeX, Python, Lua, C#, HTML, CSS, and Javascript. Neovim version: v0.8.0

Programming Languages

lua
6591 projects
Vim Snippet
174 projects
Vim Script
2826 projects

Projects that are alternatives of or similar to nvim-config

nvimrc
vimrc for neovim written in lua
Stars: ✭ 99 (+110.64%)
Mutual labels:  neovim-dotfiles, neovim-configuration, neovim-lua, neovim-config
.dotfiles
💻 My settings for macOS, kitty, zsh, nvim, tmux, and more 🛠
Stars: ✭ 44 (-6.38%)
Mutual labels:  neovim-dotfiles, neovim-configuration, neovim-lua, neovim-config
LunarVim
An IDE layer for Neovim with sane defaults. Completely free and community driven.
Stars: ✭ 9,296 (+19678.72%)
Mutual labels:  neovim-configuration, neovim-lua, neovim-config
neocode
Completely theme responsive, lean, streamlined lua configuration for neovim (dotfiles). NeoCode aims to provide a fluent experience in nvim and vscode.
Stars: ✭ 38 (-19.15%)
Mutual labels:  neovim-dotfiles, neovim-configuration, neovim-lua
nyoom.nvim
Blazing fast, configurable, minimal and lispy neovim config written in Fennel and Rust. Base config for users to extend and add upon, leading to a more unique editing experience. (🚀)
Stars: ✭ 304 (+546.81%)
Mutual labels:  neovim-dotfiles, neovim-configuration, neovim-lua
awesome-neovim
Awesome Configurations for C/C++,Zig,Web and Lua development in NeoVim
Stars: ✭ 54 (+14.89%)
Mutual labels:  neovim-dotfiles, neovim-lua, neovim-config
nvim
There are many neovim configurations, but this one is mine...
Stars: ✭ 41 (-12.77%)
Mutual labels:  neovim-dotfiles, neovim-configuration
code runner.nvim
Neovim plugin.The best code runner you could have, it is like the one in vscode but with super powers, it manages projects like in intellij but without being slow
Stars: ✭ 234 (+397.87%)
Mutual labels:  neovim-configuration, neovim-config
dotfiles
Dotfiles for Neovim (0.7+), Fish shell, git, Kitty, tmux, and more.
Stars: ✭ 54 (+14.89%)
Mutual labels:  neovim-configuration, neovim-config
neovim-config
Modern NeoVim config for IDE-like development
Stars: ✭ 89 (+89.36%)
Mutual labels:  neovim-lua, neovim-config
vimconf-2021
Presentation for VimConf 2021
Stars: ✭ 26 (-44.68%)
Mutual labels:  neovim-configuration, neovim-lua
Dot-It-Up
A collection of dotfile scripts, plugins, and clever hacks so that you can become the master of your own OS! 🚀
Stars: ✭ 254 (+440.43%)
Mutual labels:  neovim-dotfiles, neovim-configuration
UltiVim
🌕 A blazing fast and highly documented configuration to serve as a guide.
Stars: ✭ 35 (-25.53%)
Mutual labels:  neovim-dotfiles, neovim-configuration
Neovim-from-scratch
📚 A Neovim config designed from scratch to be understandable
Stars: ✭ 3,825 (+8038.3%)
Mutual labels:  neovim-dotfiles, neovim-config
modes.nvim
Prismatic line decorations for the adventurous vim user
Stars: ✭ 299 (+536.17%)
Mutual labels:  neovim-lua
Neovim-Studio
Neovim turned full-blown IDE
Stars: ✭ 30 (-36.17%)
Mutual labels:  neovim-configuration
nvim
Structure, documented, super fast neovim configuration. 可能是翻斗花园最好用的 neovim 配置[^1]。
Stars: ✭ 223 (+374.47%)
Mutual labels:  neovim-config
nvim
No description or website provided.
Stars: ✭ 13 (-72.34%)
Mutual labels:  neovim-dotfiles
dotfiles
Terminal config managed via GNU Stow and symlinks
Stars: ✭ 14 (-70.21%)
Mutual labels:  neovim-configuration
dotfiles
My doots. Changes are frequent, stability not guaranteed. Supports Arch, CentOS and Darwin.
Stars: ✭ 27 (-42.55%)
Mutual labels:  neovim-dotfiles

nvim-config

Just another opinionated, visually appealing Neovim IDE.
Pre-configured for LaTeX, Python, Lua, C#, HTML, CSS, and Javascript.

license stars forks

Table of Contents

Screenshots 📷

start file explorer file navigation latex latex python

Installation

The following instructions are for Windows (powershell). An admin prompt is required.

  1. Install chocolatey.

    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
  2. Install main dependencies.

    choco install -y git.install --params "/GitAndUnixToolsOnPath /NoGitLfs /SChannel /NoShellIntegration";
    choco install -y neovim python SumatraPDF.install miktex.install;
    # Needed for various plugins
    choco install -y universal-ctags strawberryperl make SQLite ripgrep fd golang; refreshenv; exit
    
  3. Install python dependencies.

    pip install pynvim neovim-remote
    
  4. Clone the repository and open nvim-qt or nvim.

    For fresh installation:

    git clone https://github.com/Neelfrost/nvim-config.git "$HOME\Appdata\Local\nvim"; nvim-qt.exe
    

    For existing config:

    ren "$HOME\Appdata\Local\nvim" 'nvim-old'; git clone https://github.com/Neelfrost/nvim-config.git "$HOME\Appdata\Local\nvim"; nvim-qt.exe
    

LaTeX

Formatting (latexindent)

latexindent is now included with miktex, so downloading it separately is no longer necessary. Moreover, null-ls is pre-configured to run latexindent on save for tex files. Global formatting rules can be changed by:

  1. Creating $HOME/indentconfig.yaml:

    paths:
      - C:\Users\<username>\defaultSettings.yaml
  2. Creating $HOME/defaultSettings.yaml, followed by copying and overriding defaultSettings.

For further reading refer: docs.

Viewing PDF

To launch SumatraPDF using VimTeX (\lv), ensure SumatraPDF.exe is added to environment path.

Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name path -Value $((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name path).path + ";" + "$HOME\AppData\Local\SumatraPDF" + ";"); refreshenv; exit

Inverse Search

For inverse search, open SumatraPDF then go to Settings -> Options and set inverse search command-line to:

cmd /c start /min nvim --headless -c "PackerLoad vimtex" -c "VimtexInverseSearch %l '%f'"

Use :checkhealth to check for errors if any.

Language Servers

Python (pyright)

  1. Install npm.

    choco install -y nodejs.install; refreshenv; exit
    
  2. Install pyright.

    npm install -g pyright
    
  3. Install black, isort, and flake for formatting and linting.

    pip install flake8 black isort
    
  4. Use :checkhealth to check for errors if any.

Lua (sumneko_lua)

  1. Install dependencies.

    choco install -y 7zip.install; refreshenv; exit
    
  2. cd into install directory. For example:

    cd C:\tools
    
  3. Install sumneko lua-language-server.

    curl.exe -L $(curl.exe -s https://api.github.com/repos/sumneko/vscode-lua/releases/latest | findstr.exe "win32-x64" | %{"$($_.Split('"')[3])"} | findstr.exe "github") -o lua.vsix; 7z.exe x .\lua.vsix; rm '.\`[Content_Types`].xml'; rm .\extension.vsixmanifest; rm .\lua.vsix; mv .\extension\server\ .; rm .\extension\ -Recurse; Rename-Item .\server\ lua-language-server;
  4. Install stylua for formatting.

    curl.exe -L $(curl.exe -s https://api.github.com/repos/JohnnyMorganz/StyLua/releases/latest | findstr.exe "win64.zip" | %{"$($_.Split('"')[3])"} | findstr.exe "github") -o stylua-win64.zip; 7z.exe x -oC:\tools\stylua .\stylua-win64.zip; rm .\stylua-win64.zip;
    # Add stylua to environment path:
    Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name path -Value $((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name path).path + ";" + "C:\tools\stylua" + ";"); refreshenv; exit
  5. Use :checkhealth to check for errors if any.

C# (omnisharp)

  1. Install dotnet-sdk.

    choco install dotnet-sdk -y
    
  2. Install omnisharp-roslyn.

    curl.exe -L $(curl.exe -s https://api.github.com/repos/OmniSharp/omnisharp-roslyn/releases/latest | findstr.exe "omnisharp-win-x64-net6.0.zip" | %{"$($_.Split('"')[3])"} | findstr.exe "github") -o omnisharp-win-x64-net6.0.zip; 7z.exe x -oC:\tools\omnisharp .\omnisharp-win-x64-net6.0.zip; rm .\omnisharp-win-x64-net6.0.zip;
    
  3. Use :checkhealth to check for errors if any.

HTML, CSS, Javascript (vscode-langservers-extracted)

  1. Install dependencies.

    npm i -g vscode-langservers-extracted
    
  2. Install prettierd for formatting.

    npm i -g @fsouza/prettierd
    
  3. Use :checkhealth to check for errors if any.

Update 🚀

  1. Pull changes.

    cd "$HOME\Appdata\Local\nvim"; git pull
    
  2. Open nvim-qt or nvim and update plugins:

    :PackerSync
    

Features 📃

General

  • Smart display line movement.
  • Resume cursor position when re-opening a file.
  • Auto update file if changed outside of neovim.
  • Fix mixed indents (tabs are converted to spaces).
  • Persistent cursor positions when switching buffers.
  • Ability to search custom directories in telescope.nvim.
  • Ability to reload specific modules using telescope.nvim.
  • Automatically trim trailing whitespaces and newlines on save.
  • Search and replace selection (automatically escape special chars).
  • Open windows terminal, vscode, explorer at current directory using \\t, \\c, \\e respectively.

LaTeX

Compile status on statusline Compile not started Compile not started Compile running Compile running Compile success Compile success Compile failed Compile failed
  • Extensive snippets for LaTeX.
  • Better auxiliary file cleaner.
  • Null-ls: latexindent, chktex support.
  • Automatically substitute \ in imports (include, input) with / on save.
  • Keybinds for bold, underline, math, chemical formula environments.
  • Start newline with \item (or \task) if inside a list environment when pressing Enter, o or O.

Folder Structure

nvim
├── after
│   └── ftplugin         # filetype specific options, settings, mappings
├── lua                  # .lua config files
│   └── user
│       └── mappings.lua # keybinds
│       └── options.lua  # vim options
│       └── utils.lua    # utility functions
│       └── plugins
│           ├── config   # plugin config
│           └── init.lua # plugin definition file
├── ultisnips            # snippets
│   └── tex              # latex snippets
└── viml                 # .vim config files

Plugins

LSP

File navigation

Code completion

LaTeX

Looks

Buffer, Status

QOL

Mappings

Shortcut Mode Description
F2 Normal Replace word under cursor
F2 Visual Rename selection
F5 Normal Open telescope.nvim module reloader
F10 Normal Toggle spellcheck
F11 Normal Toggle warp
F12 Normal Toggle paste mode
\\t Normal Open windows terminal at cwd
\\e Normal Open explorer at cwd
\\c Normal Open current file in VSCode
\\n Normal Open current file in notepad
tf Normal Open telescope.nvim find files
tr Normal Open telescope.nvim recent files
ts Normal Open telescope.nvim session browser
\q Normal Toggle quickfix
\h Normal Disable search highlight
\v Normal/Insert Paste from system clipboard in paste mode
\w Normal Close buffer (will discard changes if not saved)
\u Normal Open URL under cursor in browser
\s Normal Search word under cursor in browser
\n Normal Open dashboard
f Normal Search buffer using 1 chars
S Normal Search buffer using 2 chars
Tab Normal Move to next buffer
Shift Tab Normal Move to previous buffer
Tab Insert Expand trigger or jump to next tab stop
Shift Tab Insert Jump to previous tab stop
Ctrl j(k) Command Move between completion items
Ctrl j(k) Insert Move between completion items
Alt d Normal Duplicate current line below
Alt j(k) Normal/Visual Move line (block) up or down
Alt ] Normal Increase indent
Alt [ Normal Decrease indent
Ctrl / Normal/Visual/Insert Comment current (selected) line(s)
Enter Insert Select completion item
Ctrl Space Insert Force completion menu to open
Ctrl c Insert Force completion menu to close
Ctrl e Insert Select first completion item
Ctrl t Insert Open omni-func completion
Ctrl Backspace Insert Delete previous word
Ctrl Delete Insert Delete next word
Ctrl b Normal Toggle nvim-tree
Ctrl f Normal Format document
Ctrl h(jkl) Normal Move to window to the left (down, up, right)
Ctrl s Normal Save current file
Ctrl Shift s Normal Save and reload module (current file)
Ctrl v Insert Paste from system clipboard
Ctrl z Insert Correct preceding misspelt word
Ctrl z Normal Correct misspelt word under cursor
gD Normal LSP: Goto function declaration
gi Normal LSP: Goto function implementation
gh Normal LSP: Preview documentation
gd Normal LSP: Preview function definition
gs Normal LSP: Preview signature help
gr Normal LSP: Rename instance
gl Normal LSP: Show line diagnostic
gR Normal LSP: Show references
ga Normal LSP: Trigger code action
\li Normal VimTeX: Info
\lT Normal VimTeX: TOC toggle
\lq Normal VimTeX: Log
\lv Normal VimTeX: View pdf
\lr Normal VimTeX: Reverse search
\ll Normal VimTeX: Compile
\lk Normal VimTeX: Stop
\le Normal VimTeX: Errors
\lC Normal VimTeX: Clean full
\lx Normal VimTeX: Reload
\lX Normal VimTeX: Reload state
\t Normal Python, Lua, C#: Run code in external terminal
\r Normal Python, Lua: Run code without terminal output
\lt Normal Lua (LÖVE2D): Run game in external terminal
\lr Normal Lua (LÖVE2D): Run game without terminal output

Todo

  • Improve mappings table
  • Document snippets
  • Automatic install script
  • Create video to showcase snippets
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].