mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-30 15:44:37 +02:00
handsome new plugin config
This commit is contained in:
parent
f99b82bd6e
commit
89ea86f0ae
5 changed files with 32 additions and 7 deletions
|
@ -27,6 +27,8 @@ O = {
|
||||||
|
|
||||||
database = {save_location = '~/.config/nvcode_db', auto_execute = 1},
|
database = {save_location = '~/.config/nvcode_db', auto_execute = 1},
|
||||||
|
|
||||||
|
plugins = {hop = {active = false}},
|
||||||
|
|
||||||
lang = {
|
lang = {
|
||||||
python = {
|
python = {
|
||||||
active = false,
|
active = false,
|
||||||
|
@ -143,10 +145,10 @@ O = {
|
||||||
css = {
|
css = {
|
||||||
active = false,
|
active = false,
|
||||||
|
|
||||||
formatter = '', autoformat = false, virtual_text = true},
|
formatter = '',
|
||||||
json = {
|
autoformat = false,
|
||||||
active = false,
|
virtual_text = true
|
||||||
formatter = '', autoformat = false, virtual_text = true}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,9 @@ utils.define_augroups({
|
||||||
{'BufNewFile', '*', 'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'},
|
{'BufNewFile', '*', 'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'},
|
||||||
{'VimLeavePre', '*', 'set title set titleold='},
|
{'VimLeavePre', '*', 'set title set titleold='},
|
||||||
{'FileType', 'qf', 'set nobuflisted'},
|
{'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', 'GoyoLeave', 'lua require(\'galaxyline\').disable_galaxyline()'},
|
||||||
-- {'User', 'GoyoEnter', 'lua require(\'galaxyline\').galaxyline_augroup()'},
|
-- {'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', 'luafile '..CONFIG_PATH..'/lua/lsp/java-ls.lua'},
|
||||||
{'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'}
|
{'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'}
|
||||||
},
|
},
|
||||||
|
|
||||||
_go = {
|
_go = {
|
||||||
-- Go generally requires Tabs instead of spaces.
|
-- Go generally requires Tabs instead of spaces.
|
||||||
{'FileType', 'go', 'setlocal tabstop=4'},
|
{'FileType', 'go', 'setlocal tabstop=4'},
|
||||||
|
|
|
@ -1,2 +1,8 @@
|
||||||
vim.api.nvim_set_keymap('n', 's', ":HopChar2<cr>", {silent = true})
|
local M = {}
|
||||||
vim.api.nvim_set_keymap('n', 'S', ":HopWord<cr>", {silent = true})
|
|
||||||
|
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
|
||||||
|
|
|
@ -27,7 +27,8 @@ local function require_plugin(plugin)
|
||||||
return ok, err, code
|
return ok, err, code
|
||||||
end
|
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)
|
return require("packer").startup(function(use)
|
||||||
-- Packer can manage itself as an optional plugin
|
-- Packer can manage itself as an optional plugin
|
||||||
|
@ -109,6 +110,15 @@ return require("packer").startup(function(use)
|
||||||
}
|
}
|
||||||
|
|
||||||
use {"hrsh7th/vim-vsnip"}
|
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
|
-- extras
|
||||||
-- if O.matchup then require('lv-matchup') end
|
-- if O.matchup then require('lv-matchup') end
|
||||||
|
|
|
@ -16,6 +16,9 @@ O.document_highlight = true
|
||||||
O.extras = false
|
O.extras = false
|
||||||
O.leader_key = ' '
|
O.leader_key = ' '
|
||||||
|
|
||||||
|
-- After changing plugin config it is recommended to run :PackerCompile
|
||||||
|
O.plugins.hop.active = true
|
||||||
|
|
||||||
-- dashboard
|
-- dashboard
|
||||||
-- O.dashboard.custom_header = {""}
|
-- O.dashboard.custom_header = {""}
|
||||||
-- O.dashboard.footer = {""}
|
-- O.dashboard.footer = {""}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue