• Stars
    star
    141
  • Rank 251,407 (Top 6 %)
  • Language
    Lua
  • Created over 2 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A must-have configuration for Spacemacs users after defecting to Vim

🪐 My Neovim Configuration 🚀

A must-have configuration for Spacemacs users after defecting to Vim

Build Status Build Status

If you want the power of VSCode, the interactivity of Spacemacs, and the text-objects of Vim, I highly recommend you try this configuration.

The leader key is the spacebar.

Each of our shortcut keys has a friendly text description and guide after you press the spacebar, so there is absolutely no need to memorize the shortcut keys, so the spacebar key is the key you can confidently press before everything you want to do.

Key Features

  1. LSP: nvim-lspconfig, lspsaga, lspfuzzy

  2. Spacemacs operating experience:

    a. shortcuts: spacemacs style keyboard shortcuts with which-key,

    b. ivy: Telescope like ivy and helm-swoop

    c. layers: spacemacs layer abstraction

    d. customization: like spacemacs, it can be easily customized by users in particular

    e. etc.

  3. Looking forward to your continued exploration, there are some screenshots

Get A Taste Of

If you're worried about breaking your current vim configuration but want to try it out for yourself, you can use docker to give it a quick try in an isolated environment:

docker run -it -w /root/.config/nvim yetone/cosmos-nvim nvim

Install

1. Requirements

Neovim 0.8+

Only Neovim 0.8 and above are supported, please refer to the official installation documentation of Neovim: Install Neovim

Nerd Fonts

Go to Nerd Fonts homepage to download the patched fonts you are currently using.

Chafa

My configuration use Chafa to render GIF, you can install it by homebrew: brew install chafa

iTerm2 colorscheme [Optional]

If you are using iTerm2 and expect the iTerm colors to blend well with cosmos-nvim colors, it is highly recommended to install and use this colorscheme for iTerm2.

2. Install my configuration

rm -rf ~/.config/nvim.yetone-backup; mv ~/.config/nvim{,.yetone-backup} || true

git clone --depth 1 https://github.com/yetone/cosmos-nvim.git ~/.config/nvim

3. Install your language lsp server in your nvim

For example, if you are writing Python, you can start by opening a Python file and running the following command:

:MasonInstall pyright

And restart nvim.

Custom Configuration

If you want to define your own configuration, you can create a file called .cosmos-nvim.lua in the $HOME root directory (the shortcut is leader - f - e - d), for example:

~/.cosmos-nvim.lua

local cosmos = require('core.cosmos')

return {
  layers = {
    'editor',
    'git',
    {
      'ui',
      enable_beacon = false,
      enable_smooth_scrolling = false,
    },
    {
      'completion',
      tab_complete_copilot_first = false,
    },
  },
  options = {
    -- python3_host_prog = '~/.pyenv/versions/nvim-py3/bin/python',
  },
  before_setup = function()
    -- cosmos.add_plugin('wakatime/vim-wakatime')
  end,
  after_setup = function()
    -- cosmos.add_leader_keymapping('n|aw', { '<cmd>WakaTimeToday<cr>', name = 'WakaTime Today' })
  end,
}

Themes

cosmos-nvim theme colors and highlights are copied from NvChad/base46 project, because NvChad/base46 can't be used alone, so I can only copy the code, please tell me if there is something wrong with this way of using, many thanks to the author siduck! His NvChad neovim distribution is also very impressive!

All available themes are in this directory: lua/layers/ui/themes.

You can preview themes by shortcut leader - t - p

You can switch themes in this way:

Change file ~/.cosmos-nvim.lua(the shortcut is leader - f - e - d)

local cosmos = require('core.cosmos')

return {
  layers = {
    'editor',
    'git',
    {
      'ui',
      theme = 'tokyonight' -- <-- add or modify this option
    },
    'completion',
  },
  -- ...
}

Some Screenshots

Which Key like spacemacs

Fuzzy search commands like spacemacs

Easymotion

Find recent files

The status bar with lsp status

Search current buffer like emacs helm-swoop

List symbols

More Repositories

1

openai-translator

基于 ChatGPT API 的划词翻译浏览器插件和跨平台桌面端应用 - Browser extension and cross-platform desktop application for translation based on ChatGPT API.
TypeScript
15,840
star
2

bob-plugin-openai-translator

基于 ChatGPT API 的文本翻译、文本润色、语法纠错 Bob 插件,让我们一起迎接不需要巴别塔的新时代!
JavaScript
4,678
star
3

bob-plugin-openai-polisher

使用 ChatGPT API 给文本进行润色和语法纠错的 Bob 插件!完美代替 Grammarly!
JavaScript
490
star
4

bob-plugin-rapidapi-deepl-translator

DeepL RapidAPI 的 Bob 插件,可能是中国 macOS 用户可以无痛使用的相对合法的最便宜的 DeepL 翻译方案。
JavaScript
318
star
5

collipa

The source code of Collipa
JavaScript
214
star
6

mirdb

MirDB: A Persistent Key-Value Store with Memcached protocol.
Rust
91
star
7

olo

ORM with intelligent and elegant cache manager.
Python
82
star
8

Feather

http://feather.im 的源代码。
Python
53
star
9

chatgpt-soliloquy

ChatGPT-Soliloquy is a Chrome extension that allows ChatGPT to engage in a conversation with itself.
JavaScript
36
star
10

auto-rsync

Auto RSync by watch filesystem events.
Python
25
star
11

bruce

http://blog.yetone.net 的源代码。
Python
22
star
12

decaptcha

Auto CAPTCHA solving for Scrapy
Python
16
star
13

parsec.js

A JavaScript parser combinator library inspired by Parsec of Haskell.
JavaScript
16
star
14

yetone.github.io

Based on Gists
JavaScript
11
star
15

babeljs-python

Python bindings to babeljs
JavaScript
10
star
16

rve

React mixed Vue 3.0 API with type safety
TypeScript
9
star
17

blog

7
star
18

oscar

A simple and powerful frontend MVVM framework.
JavaScript
7
star
19

seiya

A ruby spider like scrapy-python.
Ruby
5
star
20

baidu_tts

A Python lib of Baidu TTS.
Python
5
star
21

script-manager

An elegant command-line interface. Usage like Flask-Script but more powerful and universal.
Python
5
star
22

yetone

5
star
23

orange

http://lisplife.com 的源码。
Python
3
star
24

get-selected-text

A tiny Rust library that allows you to easily obtain selected text across all platforms (macOS, Windows, Linux).
Rust
3
star
25

shani

A simple and powerful frontend template.
JavaScript
3
star
26

snakejs

YMD - Yet another Module Definition
JavaScript
3
star
27

atompunk-badge

Atompunk style status badge for circleci.
Rust
2
star
28

tauri-bug-reproducer

Tauri 😬
TypeScript
2
star
29

sketch-save

JavaScript
1
star
30

yavd

🎮 Yet another virtual dom lib.
JavaScript
1
star
31

figure_bed

JavaScript
1
star
32

lighthouse

A simple and powerful frontend router.
JavaScript
1
star
33

lias-ui

TypeScript
1
star
34

nomicon-cn

nomicon cn
HTML
1
star
35

ove

A powerful Node.js web framework.
LiveScript
1
star
36

helloworld

1
star