Home
Softono
CosmicNvim

CosmicNvim

Open source Lua
1.2K
Stars
63
Forks
0
Issues
18
Watchers
1 week
Last Commit

About CosmicNvim

CosmicNvim is a lightweight and opinionated Neovim config for web development, specifically designed to provide a πŸ’« COSMIC programming experience!

Platforms

Web Self-hosted

Languages

Lua

πŸ’« CosmicNvim

Neovim Minimum Version GitHub last commit Discord Website

CosmicNvim is a lightweight and opinionated Neovim config for web development, specifically designed to provide a πŸ’« COSMIC programming experience!

Screen Shot 2021-12-19 at 1 25 24 PM

πŸš€ Stellar Features

Native LSP

Full featured native LSP functionality!

  • πŸ“˜ Go-to definition
  • πŸ” Find references/type def/declaration
  • πŸ’‘ Code actions
  • 🚨 Statusline diagnostics
  • πŸ”§ Formatting thanks to conform.nvim

Additional features

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.13.0+ (Nightly)
  • Node.js (recommended for JS/TS tooling)
  • prettierd (required for default JS/TS/CSS/HTML/JSON formatting)

Install

  # move to config dir
  cd ~/.config
  # back up current config
  cp -r nvim nvim.backup
  # clone repository
  git clone https://github.com/CosmicNvim/CosmicNvim.git nvim
  # open nvim and install plugins
  nvim

By default, this will assume the Cosmic git directory is placed at vim.fn.stdpath('config'), i.e. ~/.config/nvim. If you are symlinking your pulled repo to ~/.config/nvim, you must define the shell environment variable COSMICNVIM_INSTALL_DIR that points to your installation.

Additional CosmicNvim installation details.

Additional LSP server installation details.

CosmicNvim uninstallation details.

βš™οΈ Configuration

General Info

Cosmic configurations

Add additional vim options

LSP config merging

Plugin customization in lua/cosmic/config/config.lua uses:

  • plugins = { ... } for direct lazy.nvim specs
  • { 'repo/name', enabled = false } to disable a built-in plugin
  • another spec with the same repository ID to override a built-in plugin
  • lsp.servers.NAME = true | false | { ... } to enable, disable, or override an LSP server

Built-in LSP defaults come from nvim-lspconfig and are extended by after/lsp/*.lua. User config under lsp.servers.NAME is merged on top of those defaults when the server is enabled.

Enabled servers are installed through Mason automatically. Enabled servers are enabled by Cosmic with vim.lsp.enable().

disable_builtin_plugins, plugins.add, plugins.disable, plugins.opts, plugins.override, and lsp.servers.NAME.opts have been removed.

✨ Cosmic Commands

Update CosmicNvim

Updates CosmicNvim to the latest version

:CosmicUpdate

πŸ“· Screenshots

See more