handsome new plugin config

This commit is contained in:
christianchiarulli 2021-06-28 01:46:25 -04:00
parent f99b82bd6e
commit 89ea86f0ae
5 changed files with 32 additions and 7 deletions

View file

@ -27,6 +27,8 @@ O = {
database = {save_location = '~/.config/nvcode_db', auto_execute = 1},
plugins = {hop = {active = false}},
lang = {
python = {
active = false,
@ -143,10 +145,10 @@ O = {
css = {
active = false,
formatter = '', autoformat = false, virtual_text = true},
json = {
active = false,
formatter = '', autoformat = false, virtual_text = true}
formatter = '',
autoformat = false,
virtual_text = true
}
},

View file

@ -36,6 +36,9 @@ utils.define_augroups({
{'BufNewFile', '*', 'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'},
{'VimLeavePre', '*', 'set title set titleold='},
{'FileType', 'qf', 'set nobuflisted'},
{'BufWinEnter', 'lv-config.lua', 'PackerCompile'},
{'BufWinLeave', 'lv-config.lua', 'PackerCompile'},
{'BufWritePost', 'lv-config.lua', 'PackerCompile'}
-- {'User', 'GoyoLeave', 'lua require(\'galaxyline\').disable_galaxyline()'},
-- {'User', 'GoyoEnter', 'lua require(\'galaxyline\').galaxyline_augroup()'},
@ -44,6 +47,7 @@ utils.define_augroups({
-- {'FileType', 'java', 'luafile '..CONFIG_PATH..'/lua/lsp/java-ls.lua'},
{'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'}
},
_go = {
-- Go generally requires Tabs instead of spaces.
{'FileType', 'go', 'setlocal tabstop=4'},

View file

@ -1,2 +1,8 @@
vim.api.nvim_set_keymap('n', 's', ":HopChar2<cr>", {silent = true})
vim.api.nvim_set_keymap('n', 'S', ":HopWord<cr>", {silent = true})
local M = {}
M.config = function()
vim.api.nvim_set_keymap('n', 's', ":HopChar2<cr>", {silent = true})
vim.api.nvim_set_keymap('n', 'S', ":HopWord<cr>", {silent = true})
end
return M

View file

@ -27,7 +27,8 @@ local function require_plugin(plugin)
return ok, err, code
end
-- vim.cmd "autocmd BufWritePost plugins.lua PackerCompile" -- Auto compile when there are changes in plugins.lua
vim.cmd "autocmd BufWritePost plugins.lua PackerCompile" -- Auto compile when there are changes in plugins.lua
-- vim.cmd "autocmd BufWritePost lv-config.lua PackerCompile" -- Auto compile when there are changes in plugins.lua
return require("packer").startup(function(use)
-- Packer can manage itself as an optional plugin
@ -109,6 +110,15 @@ return require("packer").startup(function(use)
}
use {"hrsh7th/vim-vsnip"}
use {
event = 'BufRead',
'phaazon/hop.nvim',
config = function()
require('lv-hop').config()
end,
disable = not O.plugins.hop.active,
opt = true
}
-- extras
-- if O.matchup then require('lv-matchup') end

View file

@ -16,6 +16,9 @@ O.document_highlight = true
O.extras = false
O.leader_key = ' '
-- After changing plugin config it is recommended to run :PackerCompile
O.plugins.hop.active = true
-- dashboard
-- O.dashboard.custom_header = {""}
-- O.dashboard.footer = {""}