Skip to content

Commit

Permalink
Merge pull request #167 from jessebot/cleaning_up_docs
Browse files Browse the repository at this point in the history
Soft deprecate vim in favor of neovim; clean up docs; bump packages; clean packages
  • Loading branch information
cloudymax authored Mar 11, 2023
2 parents 35749bd + ca09dae commit 2ddf91b
Show file tree
Hide file tree
Showing 17 changed files with 374 additions and 350 deletions.
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,21 @@ Get your daily driver just the way you like it, from dot files insta
- use several package managers across Linux and macOS (you can even add your own!)
- group together packages for different kinds of setups, e.g. gaming, devops, gui

#### Vim/NeoVim Plugin Management
- Keep your [vim-plug] or [packer] plugins installed and up to date in both vim and neovim.
#### NeoVim Plugin Management
- Keep your [packer] plugins installed and up to date in neovim.
(Lazy support rolling out soon)

<small>Keep your [vim-plug] plugins installed and up to date in vim</small>

#### Easy `yaml` config files
- [config files](https://github.com/jessebot/onboardme#configuration) in your `$HOME/.config/onboardme/` directory
- we also support the [XDG Base Directory Spec] and will use `$XDG_CONFIG_HOME/onboardme/` if you have `XDG_CONFIG_HOME` configured
- [XDG Base Directory Spec] use for [config files](#configuration)
- Uses `"$XDG_CONFIG_HOME/onboardme"`

#### Other useful (but optional) configurations
- Enable touchID for sudo on macOS
- Add your user to the docker group
- Install nerdfonts (defaults to Hack and Mononoki)
- Set capslock to control
- Install nerdfonts (defaults to Hack and Symbols Only)
- Set capslock to control (🚧 in the works)

### Screenshots

Expand All @@ -60,8 +63,8 @@ Get your daily driver just the way you like it, from dot files insta

<p align="center" width="100%">

### vim
<img width="90%" src='https://raw.githubusercontent.com/jessebot/onboardme/main/docs/onboardme/screenshots/vim_example_1.png' alt='screenshot of vim with colors'>
### neovim
<img width="90%" src='https://raw.githubusercontent.com/jessebot/onboardme/main/docs/onboardme/screenshots/neovim_example_1.png' alt='screenshot of neovim with colors'>

### Powerline and ls
<img width="80%" src='https://raw.githubusercontent.com/jessebot/onboardme/main/docs/onboardme/screenshots/ls_tree_examples.png' alt='screenshot of powerline and lsd'>
Expand Down Expand Up @@ -125,15 +128,15 @@ steps:
- dot_files
- packages
- font_setup
- vim_setup
# - vim_setup -- this is optional
- neovim_setup
- sudo_setup
# these are linux specific steps
Linux:
- dot_files
- packages
- font_setup
- vim_setup
# - vim_setup -- this is optional
- neovim_setup
- group_setup

Expand Down Expand Up @@ -183,6 +186,7 @@ package:

#### Optimized for:

[![made-with-neovim](https://img.shields.io/badge/NeoVim-%2357A143.svg?&style=for-the-badge&logo=neovim&logoColor=white)](https://neovim.io/)
[![made-with-for-vim](https://img.shields.io/badge/VIM-%2311AB00.svg?&style=for-the-badge&logo=vim&logoColor=white)](https://www.vim.org/)
[![made-with-python](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue)](https://www.python.org/)
[![made-with-bash](https://img.shields.io/badge/GNU%20Bash-4EAA25?style=for-the-badge&logo=GNU%20Bash&logoColor=white)](https://www.gnu.org/software/bash/)
Expand All @@ -195,18 +199,17 @@ package:

### License

GNU AFFERO GENERAL PUBLIC LICENSE Version 3:
GNU AFFERO GENERAL PUBLIC LICENSE Version 3

TLDR;
- You are free to use and distribute the software for free, but you cannot bundle it with software that you are charging money for.
- You are free to bundle software with other FOSS projects if you just credit us and link back to this project.
- All derivatives of this software must be licensed as GNU AFFERO GENERAL PUBLIC LICENSE Version 3 and must open source the source code as well as credit this project and the contibutors.
- You are free to bundle this software with other FOSS projects if you just credit us and link back to this project.
- All derivatives of this software must be licensed as GNU AFFERO GENERAL PUBLIC LICENSE Version 3 or later and must open source the source code as well as credit this project and the contibutors.

## Status
Still not production ready, but reasonably stable :)

Please report 🐛 in the GitHub issues, and we will collect them,
and release them into the wild, because we are vegan and nice.
and release them back into the wild, because we are vegan and nice.
(Kidding, we will help! 😌)

We love contributors! Feel free to open a pull request, and we will review it asap! :)
Expand Down
18 changes: 10 additions & 8 deletions docs/ide/neovim/neovim.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ It's supposed to be faster than vim at a lot of things, and there's more
extensible plugins and active communities, it would seem anyway, from my casual
observation over the past year-ish (it's October 2022 at the time of writing).

To be honest, I've been using vim since 2011, and even though neovim has been
To be honest, I'd been using vim since 2011. Even though neovim had been
around since 2015, since I was using vi before vim, I never really gave it a
ton of thought. But recently there finally came [a plugin][0] that looked too
ton of thought. But recently there finally came [a plugin] that looked too
good not to try, but was only available for neovim, so I figured, at very least,
I should give it a go. I'll document anything interesting I learn here.
I should give it a go.

Update: It's March 2023 and I'm now using neovim fully time :)

# Getting Started with Neovim

Expand All @@ -34,9 +36,9 @@ The config file is located at:

| OS | Location |
|:-------------------|:-----------------------------------------------|
| Unix | ~/.config/nvim/init.vim (or init.lua) |
| Windows | ~/AppData/Local/nvim/init.vim (or init.lua) |
| `$XDG_CONFIG_HOME` | `$XDG_CONFIG_HOME`/nvim/init.vim (or init.lua) |
| `$XDG_CONFIG_HOME` | `$XDG_CONFIG_HOME`/nvim/init.lua (or init.vim) |
| Unix | ~/.config/nvim/init.lua (or init.vim) |
| Windows | ~/AppData/Local/nvim/init.lua (or init.vim) |

And if you want to just get your vim stuff working, you want to these contents
in your `~/.config/nvim/init.vim`:
Expand Down Expand Up @@ -113,7 +115,7 @@ nnoremap <space> za
And here's what that translated to in my `init.lua`:

```lua
-- let spacebar allow me to fold the code
-- let spacebar allow me to fold the code in normal mode
-- in vimscript, this was: nnoremap <space> za
vim.keymap.set('n', '<space>', 'za')
```
Expand All @@ -137,5 +139,5 @@ vim.cmd [[colorscheme spacechalk]]
# Helpful links
[Floating windows in neovim](http://www.statox.fr/posts/2021/03/breaking_habits_floating_window/)

[0]: https://github.com/numirias/semshi#readme "semshi"
[a plugin]: https://github.com/numirias/semshi#readme "semshi"
[1]: https://github.com/jessebot/space-chalk "space-chalk"
124 changes: 65 additions & 59 deletions docs/ide/neovim/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ description: "Plugins for neovim and how to install them"
---

# Neovim plugins
This got long enough it needed it's own page
This got long enough it needed it's own page. If you just want to see what plugins we use here at onboardme, you can check them out [here](https://github.com/jessebot/dot_files/blob/main/.config/nvim/lua/plugins.lua).


## Know issues

<details>
<summary>Python3 Plugins</summary>

Expand All @@ -20,66 +22,19 @@ This got long enough it needed it's own page

```bash
# I use python3.11 everywhere right now, but you probably don't need to specify
python3.11 -m pip install --user --upgrade pynvim
python3 -m pip install --user --upgrade pynvim
```

After that, all my plugins worked find as they do in vim.

</details>

## vim-plug
I have a [whole section on vim-plug under vim](https://jessebot.github.io/onboardme/vim/vim-plugins), but we have a few caveats if we
want to use it in neovim.

<details>
<summary>Continuing to use vim-plug from vim</summary>
## Lazy
[lazy.nvim] is the new kid on the block for neovim package managers. I don't know much about it, but will report back soon.

## Source Plugins for vim/neovim in the same location
Having to install a package twice in two different locations is silly and makes
maintanence and updates more of a chore. Pick a location, and stick with it,
but to do this in vimscript with both an `init.vim` from neovim and a `.vimrc`
being sourced for regular vim, we get into slightly more complicated territory,
and kind of repetitive. The quick way I found was to have a section in your
`.vimrc` like this:

```vim
" this means: don't run this part in if we're using neovim
if !has('nvim')
call plug#begin()
" put all your vim plugins here, but don't include anything that only
" works in neovim (e.g. semshi)
" plugin that works in vim/neovim: This is helpful for markdown
Plug 'junegunn/limelight.vim'

call plug#end()
endif
```

and then in your `init.vim`, have something like this AFTER you source your
`.vimrc`, so that vim-plug knows where to source your plugin exactly:

```vim
source ~/.vimrc
call plug#begin()
" plugin that works in vim/neovim but was installed with vim-plug in vim
Plug 'junegunn/limelight.vim', {'dir': '~/.vim/plugged/limelight.vim'}
" Example plugin that only works in neovim
Plug 'numirias/semshi', { 'do': ':UpdateRemotePlugins' }
call plug#end()
```

</details>

## Introducing Packer
You'll start seeing a lot of people talking about packer as you go on your neovim
## Packer
You'll start seeing a lot of people talking about [packer] as you go on your neovim
journey. It's similar to vim-plug or vundle, but it's in pure lua. In your `init.lua`,
put the following:

Expand Down Expand Up @@ -117,12 +72,8 @@ return require('packer').startup(function(use)
-- something like vim-plug, like: Plug 'junegunn/limelight.vim'
use '~/.vim/plugged/limelight.vim'


-- Example plugin where we run :Updateremoteuseins after loadin the plugin
-- and only run it on python filetypes.
use {'numirias/semshi', run = ':UpdateRemoteuseins', ft = 'py'}
-- this would be like running this for vim-plug:
-- Plug 'numirias/semshi', { 'do': ':UpdateRemoteuseins', 'filetype': 'py' }
-- Example github based plugin: https://github.com/mfussenegger/nvim-treehopper
use {'mfussenegger/nvim-treehopper'}

-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins
Expand All @@ -137,6 +88,58 @@ _Note: You can checkout my actual `plugins.lua` file [here](https://github.com/j
Finally, you can open up neovim and run: `:PackerCompile` and `:PackerInstall`
and you should be on your way :)


## vim-plug
I have a [whole section on vim-plug under vim](https://jessebot.github.io/onboardme/vim/vim-plugins), but we have a few caveats if we
want to use it in neovim.

<details>
<summary>Continuing to use vim-plug from vim</summary>

## Source Plugins for vim/neovim in the same location
Having to install a package twice in two different locations is silly and makes
maintanence and updates more of a chore. Pick a location, and stick with it,
but to do this in vimscript with both an `init.vim` from neovim and a `.vimrc`
being sourced for regular vim, we get into slightly more complicated territory,
and kind of repetitive. The quick way I found was to have a section in your
`.vimrc` like this:

```vim
" this means: don't run this part in if we're using neovim
if !has('nvim')
call plug#begin()
" put all your vim plugins here, but don't include anything that only
" works in neovim (e.g. semshi)
" plugin that works in vim/neovim: This is helpful for markdown
Plug 'junegunn/limelight.vim'
call plug#end()
endif
```

and then in your `init.vim`, have something like this AFTER you source your
`.vimrc`, so that vim-plug knows where to source your plugin exactly:

```vim
source ~/.vimrc
call plug#begin()
" plugin that works in vim/neovim but was installed with vim-plug in vim
Plug 'junegunn/limelight.vim', {'dir': '~/.vim/plugged/limelight.vim'}
" Example plugin that only works in neovim
Plug 'numirias/semshi', { 'do': ':UpdateRemotePlugins' }
call plug#end()
```

</details>

## writing little lua scripts

If you want to say, take this block from your `.vimrc`:
Expand Down Expand Up @@ -206,3 +209,6 @@ If you want extra neovim treesitter features for checking into things like highl
```vim
:TSHighlightCapturesUnderCursor
```

[packer]: https://github.com/wbthomason/packer.nvim "packer, plugin manager for neovim"
[lazy.nvim]: https://github.com/folke/lazy.nvim "lazy, a newer pugin manager for neovim"
5 changes: 1 addition & 4 deletions docs/onboardme/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,8 @@ some dot files anyway, but we won't overwrite anything you have locally.

TODO: fill this in, and make sure it doesn't conflict with other areas of the docs.

#### Vim
We use vim with these plugins you can learn more about [here](/vim).

#### Neovim
We use neovim alongside vim with these plugins you can learn more about [here](/neovim).
We use neovim with these plugins you can learn more about [here](/neovim).

</details>

Expand Down
17 changes: 7 additions & 10 deletions docs/onboardme/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you haven't already, please refer to the

You can run `onboardme` with no options or further configuration, and it will
not overwrite anything, but it will install packages and attempt to configure
fonts, vim, and give you further instructions to setup your machine on your own.
fonts, neovim, and give you further instructions to setup your machine on your own.

See below for configuration with cli options or a config file :)

Expand Down Expand Up @@ -69,14 +69,12 @@ Those defaults can be altered per machine by creating a config file like:
- dot_files
- packages
- font_setup
- vim_setup
- neovim_setup
# these are linux specific steps
Linux:
- dot_files
- packages
- font_setup
- vim_setup
- neovim_setup
- group_setup

Expand Down Expand Up @@ -140,10 +138,9 @@ Steps refer to a specific function in the list of functions we run and can be
configured for both macOS and Linux seperately. These steps include:

- setting up dot files in your home directory (.bashrc, .vimrc, etc)
- setting up vim (installing vim-plug and vim plugins)
- managing packages using package managers (brew, pip3.11, apt, snap, flatpak)
- installing fonts
- setting up basic TUI IDEs, vim/neovim
- setting up basic TUI IDE, neovim (vim is optional)
- setting up groups

They can be configured via the `steps` parameter in the `config.yaml` above,
Expand All @@ -157,16 +154,16 @@ onboardme -s dot_files
or for multiple steps:

```bash
# this runs both the dot_file management step and the vim setup step
onboardme -s dot_files -s vim_setup
# this runs both the dot_file management step and the neovim setup step
onboardme -s dot_files -s neovim_setup
```

If you try to run a step that requires another step, we will automatically run
that step so for instance, to set up vim, we need dot files. e.g.
that step so for instance, to set up neovim, we need dot files. e.g.

This command: `onboardme -s vim_setup`
This command: `onboardme -s neovim_setup`

In the background becomes: `onboardme -s dot_files -s vim_setup`
In the background becomes: `onboardme -s dot_files -s neovim_setup`

### dot files
The dot files for your home directory are installed from a git URL and branch
Expand Down
Loading

0 comments on commit 2ddf91b

Please sign in to comment.