Skip to content

Commit

Permalink
repo: Add minimal init files and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
judaew committed Sep 13, 2023
1 parent 69bb4eb commit 6ccaf0d
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 14 deletions.
56 changes: 42 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,52 @@ ronny.nvim is a dark colorscheme for [Neovim](https://github.com/neovim/neovim),

## Installation

Install via package manager (e.g. [packer.nvim](https://github.com/wbthomason/packer.nvim) or [lazy.nvim](https://github.com/folke/lazy.nvim)):
Install via package manager (e.g. [vim-plug](https://github.com/junegunn/vim-plug), [packer.nvim](https://github.com/wbthomason/packer.nvim) or [lazy.nvim](https://github.com/folke/lazy.nvim)):

<details><summary>vim-plug</summary>

```vim
call plug#begin()
Plug 'judaew/ronny.nvim'
call plug#end()
colorscheme ronny
lua require('ronny').setup()
```

</details>
<details><summary>packer.nvim</summary>

```lua
-- packer.nvim:
use "judaew/ronny.nvim"
vim.cmd.colorscheme("ronny")

-- lazy.nvim:
{
"judaew/ronny.nvim",
priority = 1000,
config = function()
vim.cmd.colorscheme("ronny")
require("ronny").setup()
end,
},
return require("packer").startup(function(use)
use {
"judaew/ronny.nvim",
config = function()
vim.cmd.colorscheme("ronny")
require("ronny").setup()
end
}
end)
```

</details>
<details><summary>lazy.nvim</summary>

```lua
require("lazy").setup({
{
"judaew/ronny.nvim",
priority = 1000,
config = function()
vim.cmd.colorscheme("ronny")
require("ronny").setup()
end
}
})
```

</details>

## Usage

```lua
Expand Down
36 changes: 36 additions & 0 deletions test/lazy.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
-- vim:foldenable foldmethod=marker:

-- Install and initialize lazy.nvim {{{
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- }}}

require("lazy").setup({
{
"judaew/ronny.nvim",
priority = 1000,
config = function()
vim.cmd.colorscheme("ronny")
require("ronny").setup()
end
},

-- lualine.nvim is optional
{
"nvim-lualine/lualine.nvim",
dependencies = {
"nvim-tree/nvim-web-devicons", opts = true
},
config = function() require("lualine").setup() end
}
})
37 changes: 37 additions & 0 deletions test/packer.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
-- vim:foldenable foldmethod=marker:

-- Install and initialize packer.nvim {{{
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end

local packer_bootstrap = ensure_packer()
-- }}}

return require("packer").startup(function(use)
use "wbthomason/packer.nvim"
use {
"judaew/ronny.nvim",
config = function()
vim.cmd.colorscheme("ronny")
require("ronny").setup()
end
}

-- lualine.nvim is optional
use {
"nvim-lualine/lualine.nvim",
requires = { 'nvim-tree/nvim-web-devicons', opt = true },
config = function() require("lualine").setup() end
}
if packer_bootstrap then
require('packer').sync()
end
end)
28 changes: 28 additions & 0 deletions test/vim-plug.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
" vim:foldenable foldmethod=marker:

" Install and initialize vim-plug {{{
let data_dir = stdpath('data') . '/site'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif

" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $MYVIMRC
\| endif
" }}}

call plug#begin()
Plug 'judaew/ronny.nvim'

" lualine.nvim is optional
Plug 'nvim-lualine/lualine.nvim'
Plug 'nvim-tree/nvim-web-devicons'
call plug#end()

colorscheme ronny
lua require('ronny').setup()

" lualine.nvim is optional
lua require('lualine').setup()

0 comments on commit 6ccaf0d

Please sign in to comment.