132 lines
5.4 KiB
Markdown
132 lines
5.4 KiB
Markdown
<h1 align="center">💫 CosmicNvim</h1>
|
|
|
|
<p align="center">
|
|
<img alt="Neovim Minimum Version" src="https://img.shields.io/badge/Neovim-0.6.0+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim">
|
|
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/mattleong/CosmicNvim?style=flat-square&logo=Github">
|
|
<img alt="Discord" src="https://img.shields.io/discord/901609359291854899?style=flat-square&logo=Discord">
|
|
<img alt="Website" src="https://img.shields.io/website?style=flat-square&up_message=live&label=website&url=https%3A%2F%2Fcosmicnvim.vercel.app%2F">
|
|
</p>
|
|
|
|
CosmicNvim is a lightweight and opinionated Neovim config for web development, specifically designed to provide a 💫 COSMIC programming experience!
|
|
|
|
## 🚀 Stellar Features
|
|
|
|
#### Native LSP
|
|
|
|
Full featured native LSP functionality!
|
|
|
|
- 📘 Go-to definition
|
|
- 🔍 Find references/type def/declaration
|
|
- 💡 Code actions
|
|
- 🚨 Statusline diagnostics
|
|
- ⚠️ Linting thanks to [eslint](https://github.com/williamboman/nvim-lsp-installer/blob/main/lua/nvim-lsp-installer/servers/eslint/README.md)
|
|
- 🔧 Formatting thanks to [efm](https://github.com/mattn/efm-langserver)
|
|
|
|
##### Additional features
|
|
|
|
- Amazing colors thanks to [tokyonight.nvim](https://github.com/folke/tokyonight.nvim)
|
|
- Enhanced syntax highlighting with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter)
|
|
- Hand-built statusline with [galaxyline](https://github.com/NTBBloodbath/galaxyline.nvim)
|
|
- Explore files with [nvim-tree](https://github.com/kyazdani42/nvim-tree.lua)
|
|
- Fuzzy finder and some LSP actions with [Telescope](https://github.com/nvim-telescope/telescope.nvim)
|
|
- Floating terminal with [vim-floaterm](https://github.com/voldikss/vim-floaterm)
|
|
- Auto LSP installation with [nvim-lsp-installer](https://github.com/williamboman/nvim-lsp-installer)
|
|
- Autocompletion provided by [nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
|
|
- Additional TypeScript support with [nvim-lsp-ts-utils](https://github.com/jose-elias-alvarez/nvim-lsp-ts-utils)
|
|
- Snippet support via [LuaSnip](https://github.com/L3MON4D3/LuaSnip)
|
|
- Session management with [auto-session](https://github.com/rmagatti/auto-session)
|
|
- Notifications via [nvim-notify](https://github.com/rcarriga/nvim-notify)
|
|
- Additional custom highlighting
|
|
- Floating windows for references, renaming, diagnostics, code actions and more!
|
|
|
|
_While CosmicNvim is geared specifically toward TypeScript/JavaScript development, it should be able to provide a great experience with any LSP supported language._
|
|
|
|
## Installation
|
|
|
|
### Quick guide
|
|
|
|
#### Prerequisites
|
|
|
|
- Neovim (+0.6.0)
|
|
- [Node.js](https://nodejs.org/en/)
|
|
- [prettierd](https://github.com/fsouza/prettierd) (for prettier formatting w/efm, optional)
|
|
- [eslint_d](https://www.npmjs.com/package/eslint_d) (for eslint w/efm, optional)
|
|
|
|
#### Install
|
|
|
|
```
|
|
$ cd ~/.config
|
|
$ git clone git@github.com:mattleong/CosmicNvim.git nvim
|
|
$ nvim .
|
|
```
|
|
|
|
Additional Cosmic installation [details](https://github.com/mattleong/CosmicNvim/wiki/Installation).
|
|
|
|
Additional LSP server installation [details](https://github.com/mattleong/CosmicNvim/wiki/Installing-LSP-servers).
|
|
|
|
## Configuration
|
|
|
|
[Cosmic configurations](./lua/cosmic/config/config.lua)
|
|
|
|
[Plugin configurations](./lua/cosmic/config/plugins.lua)
|
|
|
|
[Add additional mappings](./lua/cosmic/config/mappings.lua)
|
|
|
|
[Add additional vim options](./lua/cosmic/config/editor.lua)
|
|
|
|
## Treesitter Support
|
|
|
|
Enter `:TSInstall` followed by <TAB> to see your options for additional language support.
|
|
|
|
## Default Mappings
|
|
|
|
[File Navigation](./lua/cosmic/core/navigation/mappings.lua)
|
|
|
|
[File explorer](./lua/cosmic/core/file-explorer/mappings.lua)
|
|
|
|
[Terminal](./lua/cosmic/core/terminal/mappings.lua)
|
|
|
|
[LSP](./lua/cosmic/lsp/mappings.lua)
|
|
|
|
[Other](./lua/cosmic/mappings.lua)
|
|
|
|
## 📷 Screenshots
|
|
|
|
### Statusline
|
|
|
|

|
|

|
|

|
|

|
|
|
|
### Autocomplete
|
|
|
|
<img width="2532" alt="autocomplete" src="https://user-images.githubusercontent.com/3721204/138015498-3b18495e-9011-4ac2-9f3f-f020feb85caf.png">
|
|
|
|
### Rename
|
|
|
|

|
|
|
|
#### Rename change notification
|
|
|
|
<img width="486" alt="Screen Shot 2021-10-27 at 9 41 06 PM" src="https://user-images.githubusercontent.com/3721204/139188213-b1e067a6-4317-40c8-b9b2-77b0ae696f8a.png">
|
|
|
|
### Hover
|
|
|
|

|
|
|
|
### Find Reference
|
|
|
|

|
|
|
|
### Code Action
|
|
|
|

|
|
|
|
### File Navigation
|
|
|
|

|
|
|
|
### Floating Terminal
|
|
|
|

|