feat: add sneak, quickscope, colorizer, gruvbox, commenter, smoothie
This commit is contained in:
parent
95660c65af
commit
394c2db554
1
init.lua
1
init.lua
@ -24,4 +24,5 @@ require("plugins")
|
|||||||
require("options")
|
require("options")
|
||||||
require("bindings")
|
require("bindings")
|
||||||
|
|
||||||
|
require("themes.gruvbox")
|
||||||
|
|
||||||
|
15
lua/config/colorizer.lua
Normal file
15
lua/config/colorizer.lua
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
require('colorizer').setup(
|
||||||
|
nil,
|
||||||
|
{
|
||||||
|
RGB = true,
|
||||||
|
RRGGBB = true,
|
||||||
|
names = false,
|
||||||
|
RRGGBBAA = true,
|
||||||
|
rgb_fn = true,
|
||||||
|
hsl_fn = true,
|
||||||
|
css = false,
|
||||||
|
css_fn = false,
|
||||||
|
mode = 'background'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
8
lua/config/quickscope.lua
Normal file
8
lua/config/quickscope.lua
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
local g = vim.g
|
||||||
|
local cmd = vim.cmd
|
||||||
|
|
||||||
|
-- Trigger a highlight in the appropriate direction when pressing these keys:
|
||||||
|
g['qs_highlight_on_keys'] = {'f', 'F', 't', 'T'}
|
||||||
|
|
||||||
|
g['qs_max_chars'] = 150
|
||||||
|
|
23
lua/config/sneak.lua
Normal file
23
lua/config/sneak.lua
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
local map = require 'utils.map'
|
||||||
|
local g = vim.g
|
||||||
|
|
||||||
|
g['sneak#label'] = 1
|
||||||
|
|
||||||
|
-- case insensitive sneak
|
||||||
|
g['sneak#use_ic_scs'] = 1
|
||||||
|
|
||||||
|
-- immediately move to the next instance of search, if you move the cursor sneak is back to default behavior
|
||||||
|
g['sneak#s_next'] = 1
|
||||||
|
|
||||||
|
-- remap so I can use , and ; with f and t
|
||||||
|
map({'n', 'v'}, 'gS', '<plug>Sneak_;')
|
||||||
|
map({'n', 'v'}, 'gs', '<plug>Sneak_;')
|
||||||
|
-- map gS <Plug>Sneak_,
|
||||||
|
-- map gs <Plug>Sneak_;
|
||||||
|
|
||||||
|
-- highlight Sneak guifg=black guibg=#00C7DF ctermfg=black ctermbg=cyan
|
||||||
|
-- highlight SneakScope guifg=red guibg=yellow ctermfg=red ctermbg=yellow
|
||||||
|
|
||||||
|
-- Emoji prompt
|
||||||
|
g['sneak#prompt'] = '🔎'
|
||||||
|
|
@ -6,11 +6,30 @@ local function usePlugins(use)
|
|||||||
-- Temporary solution before PR gets merges. https://github.com/neovim/neovim/pull/15436
|
-- Temporary solution before PR gets merges. https://github.com/neovim/neovim/pull/15436
|
||||||
use 'lewis6991/impatient.nvim'
|
use 'lewis6991/impatient.nvim'
|
||||||
|
|
||||||
|
-- Various lua utilities
|
||||||
|
use 'nvim-lua/plenary.nvim'
|
||||||
|
|
||||||
|
-- Smooth smooth scrolling
|
||||||
|
use 'psliwka/vim-smoothie'
|
||||||
|
|
||||||
|
-- Toggle comments
|
||||||
|
use 'tpope/vim-commentary'
|
||||||
|
|
||||||
|
-- Color code colorizer
|
||||||
|
use { 'norcalli/nvim-colorizer.lua', config = [[require 'config.colorizer']] }
|
||||||
|
|
||||||
|
-- Quick movement
|
||||||
|
use { 'justinmk/vim-sneak', config = [[require 'config.sneak']] }
|
||||||
|
use { 'unblevable/quick-scope', config = [[require 'config.quickscope']] }
|
||||||
|
use 'michaeljsmith/vim-indent-object'
|
||||||
|
|
||||||
|
-- Color themes
|
||||||
|
use { 'morhetz/gruvbox', module = 'themes.gruvbox' }
|
||||||
|
|
||||||
-- Git integration
|
-- Git integration
|
||||||
use { 'tpope/vim-fugitive', config = [[require 'config.fugitive']] }
|
use { 'tpope/vim-fugitive', config = [[require 'config.fugitive']] }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Register custom commands for plugin manager
|
-- Register custom commands for plugin manager
|
||||||
vim.cmd [[command! PackerInstall packadd packer.nvim | lua require('plugins').install()]]
|
vim.cmd [[command! PackerInstall packadd packer.nvim | lua require('plugins').install()]]
|
||||||
vim.cmd [[command! PackerUpdate packadd packer.nvim | lua require('plugins').update()]]
|
vim.cmd [[command! PackerUpdate packadd packer.nvim | lua require('plugins').update()]]
|
||||||
|
19
lua/sneak.lua
Normal file
19
lua/sneak.lua
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
let g:sneak#label = 1
|
||||||
|
|
||||||
|
" case insensitive sneak
|
||||||
|
let g:sneak#use_ic_scs = 1
|
||||||
|
|
||||||
|
" immediately move to the next instance of search, if you move the cursor sneak is back to default behavior
|
||||||
|
let g:sneak#s_next = 1
|
||||||
|
|
||||||
|
" remap so I can use , and ; with f and t
|
||||||
|
map gS <Plug>Sneak_,
|
||||||
|
map gs <Plug>Sneak_;
|
||||||
|
|
||||||
|
" Change the colors
|
||||||
|
" highlight Sneak guifg=black guibg=#00C7DF ctermfg=black ctermbg=cyan
|
||||||
|
" highlight SneakScope guifg=red guibg=yellow ctermfg=red ctermbg=yellow
|
||||||
|
|
||||||
|
" Cool prompts
|
||||||
|
" let g:sneak#prompt = '🕵'
|
||||||
|
let g:sneak#prompt = '🔎'
|
10
lua/themes/gruvbox.lua
Normal file
10
lua/themes/gruvbox.lua
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
local opt = require 'utils.opt'
|
||||||
|
local cmd = vim.cmd
|
||||||
|
|
||||||
|
opt('background', 'dark')
|
||||||
|
cmd [[colorscheme gruvbox]]
|
||||||
|
|
||||||
|
-- Background transparency
|
||||||
|
cmd [[highlight Normal guibg=NONE ctermbg=NONE]]
|
||||||
|
cmd [[highlight Folded guibg=NONE ctermbg=NONE]]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user