Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand on usage guide in the README #102

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 32 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ https://user-images.githubusercontent.com/21000943/199322658-ecbf8113-fa4b-409b-
-- All builtin colorschemes can be accessed with |:colorscheme|.
vim.cmd('colorscheme base16-gruvbox-dark-soft')

-- Alternatively, you can provide a table specifying your colors to the setup function.
-- You can use the lua `setup` function instead, if you prefer.
require('base16-colorscheme').setup('base16-material-palenight')

-- Alternatively, you can provide a table specifying your 16 colors to the `setup` function.
require('base16-colorscheme').setup({
base00 = '#16161D', base01 = '#2c313c', base02 = '#3e4451', base03 = '#6c7891',
base04 = '#565c64', base05 = '#abb2bf', base06 = '#9a9bb3', base07 = '#c5c8e6',
Expand All @@ -20,26 +23,49 @@ require('base16-colorscheme').setup({

*Note: If you don't see colours, try adding `vim.opt.termguicolors = true` to your init.lua*

# Advanced Usage
## Advanced Usage

To disable highlights for supported plugin(s), call the `with_config` function **before** setting the colorscheme:

```lua
-- To disable highlights for supported plugin(s), call the `with_config` function **before** setting the colorscheme.
-- These are the defaults.
-- Call `with_config` **before** setting a colorscheme if you want to tweak anything
require('base16-colorscheme').with_config({
-- These are the defaults.
telescope = true,
telescope_borders = false,
indentblankline = true,
notify = true,
ts_rainbow = true,
cmp = true,
illuminate = true,
lsp_semantic = true,
mini_completion = true,
dapui = true,
Comment on lines +33 to 43
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be great to have some brief descriptions too, e.g:

    -- These are the defaults.
    telescope = true,          -- Enable theming telescope panels
    telescope_borders = false, -- Also theme telescope panel borders
    indentblankline = true,    -- Set colors for indentblanklins's indentation guides
    notify = true,             -- etc
    ts_rainbow = true,         -- etc

I haven't added any because I have no idea what they should be.

})

-- You can get the base16 colors **after** setting the colorscheme by name (base01, base02, etc.)
-- `setup` should be called **after** `with_config`
require('base16-colorscheme').setup('schemer-dark')

-- or use `colorscheme` instead
vim.cmd('colorscheme base16-catppuccin-mocha')
```

**After** you have called `setup` or set `colorscheme`, you can access the theme's base16 colors (base01, base02, etc.):
```lua
local color = require('base16-colorscheme').colors.base01
```

# Builtin Colorschemes
Alternatively, you can pass your config directly to `setup` as an additional argument:

```lua
-- e.g. a builtin colorscheme, with telescope & cmp integration disabled.
require('base16-colorscheme').setup('base16-tokyo-night-dark', {
telescope = false,
cmp = false,
})
```

## Builtin Colorschemes

```txt
base16-3024
Expand Down