Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/CosmicNvim/cosmic-ui

Cosmic-UI is a simple wrapper around specific vim functionality. Built in order to provide a quick and easy way to create a Cosmic UI experience with Neovim!
https://github.com/CosmicNvim/cosmic-ui

cosmic ide lua neovim neovim-configuration neovim-dotfiles neovim-lua neovim-lua-plugin neovim-plugin neovim-ui ui vim vim-plugin

Last synced: about 1 month ago
JSON representation

Cosmic-UI is a simple wrapper around specific vim functionality. Built in order to provide a quick and easy way to create a Cosmic UI experience with Neovim!

Lists

README

        

💫 Cosmic-UI


Neovim Minimum Version
GitHub last commit

Discord

## 🚀 Stellar Features

_Warning: Under heavy development_

Cosmic-UI is a simple wrapper around specific vim functionality. Built in order to provide a quick and easy way to create a Cosmic UI experience with Neovim!

- Rename floating popup & file change notification
- Code Actions

## 📷 Screenshots

### Code Actions

Screen Shot 2021-12-10 at 3 37 38 PM

### Rename Floating Popup

Screen Shot 2021-12-10 at 4 22 28 PM

## 🛠 Installation

```lua
use({
'CosmicNvim/cosmic-ui',
requires = { 'MunifTanjim/nui.nvim', 'nvim-lua/plenary.nvim' },
config = function()
require('cosmic-ui').setup()
end,
})
```

## ⚙️ Configuration

You may override any of the settings below by passing a config object to `.setup`

```lua
{
-- default border to use
-- 'single', 'double', 'rounded', 'solid', 'shadow'
border_style = 'single',

-- rename popup settings
rename = {
border = {
highlight = 'FloatBorder',
style = 'single',
title = ' Rename ',
title_align = 'left',
title_hl = 'FloatBorder',
},
prompt = '> ',
prompt_hl = 'Comment',
},

code_actions = {
min_width = nil,
border = {
bottom_hl = 'FloatBorder',
highlight = 'FloatBorder',
style = 'single',
title = 'Code Actions',
title_align = 'center',
title_hl = 'FloatBorder',
},
}
}
```

## ✨ Usage

#### Rename

```lua
function map(mode, lhs, rhs, opts)
local options = { noremap = true, silent = true }
if opts then
options = vim.tbl_extend('force', options, opts)
end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end

map('n', 'gn', 'lua require("cosmic-ui").rename()')
```

#### Code Actions

```lua
map('n', 'ga', 'lua require("cosmic-ui").code_actions()')
map('v', 'ga', 'lua require("cosmic-ui").range_code_actions()')
```

_More coming soon..._