Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fredrkl/nvimsetup
My Neovim setup
https://github.com/fredrkl/nvimsetup
neovim neovim-configuration neovim-plugin
Last synced: 6 days ago
JSON representation
My Neovim setup
- Host: GitHub
- URL: https://github.com/fredrkl/nvimsetup
- Owner: fredrkl
- License: mit
- Created: 2023-12-08T21:01:32.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-09-18T09:44:44.000Z (about 2 months ago)
- Last Synced: 2024-09-18T12:59:23.430Z (about 2 months ago)
- Topics: neovim, neovim-configuration, neovim-plugin
- Language: Lua
- Homepage: https://neovim.io/
- Size: 114 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# My Neovim setup
## Requirements
- [Nerdfonts](https://www.nerdfonts.com/font-downloads)
- [Dotnet sdk](https://dotnet.microsoft.com/en-us/download/visual-studio-sdks)
- [Nodejs](https://nodejs.org/en/download/)
- [RipGrep](https://github.com/BurntSushi/ripgrep)
- [Rust Analyzer](https://rust-analyzer.github.io/manual.html)
- [Python and pip](https://www.python.org/downloads/)Nodejs is only needed for [_GitHub Copilot_](https://github.com/features/copilot). Dotnet sdk is only needed for the _Bicep_ LSP.
## Setup
- Install neovim
- Install Nerdfonts
- Fork this repo and clone it to your `~/.config/` folder
- Start _NeoVim_
- Run `:checkhealth lazy` for `lazy vim` plugin verification
- Verify plugins by running the `Lazy` command
- With rustup installed run `rustup component add rust-analyzer`## Sources
- [Primeagen guide](https://www.youtube.com/watch?v=w7i4amO_zaE)
- [Josean Martinez guide](https://www.youtube.com/watch?v=6mxWayq-s9I)## Mason Language Server Protocol (LSP) plugin manager
This plugin uses the Mason plugin to manage LSPs. See the mason github repo for [available Mason LSP servers](https://github.com/williamboman/mason-lspconfig.nvim?tab=readme-ov-file#available-lsp-servers).
### Bicep Language Server Protocol (LSP)
The LSP for Bicep need `dotnet cli` to run, and is started with the `cmd` property. Please see the [`nvim-lspconfig.lua`](./lua/fredrkl/plugins/nvim-lspconfig.lua) and the [official `lsp config`](https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/bicep.lua) for more information.
## Debugger
To setup debugger for .net we need the `netcoredbg` tool. Unfortunately, the `netocredbg` tool does not have a native M Chip version for macOS. To install the `netcoredbg` tool, follow the instructions below.
```bash
brew install cmake
xcode-select --install
git clone [email protected]:Samsung/netcoredbg.git $HOME/repos/netcoredbg
cd $HOME/repos/netcoredbg
mkdir build
cd build
mkdir /usr/local/bin/netcoredbg
CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/bin/netcoredbg
```## GitHub Copilot
GitHub Copilot is a plugin that uses AI to help you write code. To use it, you need to have a GitHub account and be logged in to GitHub in your browser. See the neovim copliot plugin [repo](https://github.com/zbirenbaum/copilot.lua) for more information, e.g., default keybindings. The copliot plugin uses the _meta key_ by default, however that has been remapped in this settup to avoid _meta key_ usage. See the [plugin setup](./lua/fredrkl/plugins/zbirenbaum-copilot.lua) for the new keybindings.
If using iTerm2 on macOS, the _meta key_ is not enabled by default. To enable it, go to `Preferences > Profiles > Keys` and select `Left option key acts as +Esc`.
## Tmux
This neovim setup works well with [tmux](https://github.com/tmux/tmux/wiki). I have created a [tmux setup](https://github.com/fredrkl/tmux-conf) that works well with this neovim setup.
## Rest
In order to get `Rest.nvim` to work, you need to have `Python` installed.
## RipGrep
In order to use the grep telescope file search you need to install ripgrep:
```bash
brew install ripgrep
```## Throubleshooting
If the markdown preview is not working, try to run the following in its plugin folder.
```bash
yarn install
```The plugin folder is located in `~/.local/share/nvim/lazy/markdown-preview.nvim`.
## Tips
It can be beneficial to remap `Caps Lock` key to the `Ctrl` key. The `Ctrl` is used a lot in neovim, and it is easier to reach the `Caps Lock` key using the home row.