mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-25 00:38:23 -05:00
neovim: add zem-mode + symbol-outline
This commit is contained in:
parent
be9665b0e6
commit
2501edc0ea
@ -123,8 +123,8 @@ wk.register({
|
|||||||
name = 'Buffer',
|
name = 'Buffer',
|
||||||
c = {':ColorizerToggle<CR>', 'Colorizer'},
|
c = {':ColorizerToggle<CR>', 'Colorizer'},
|
||||||
d = {':bdelete<CR>', 'Close buffer'},
|
d = {':bdelete<CR>', 'Close buffer'},
|
||||||
f = {':NnnPicker %:p:h<CR>', 'File picker'},
|
n = {':DashboardNewFile<CR>', 'New file'},
|
||||||
n = {':DashboardNewFile<CR>', 'New file'}
|
z = {':ZenMode<CR>', 'Zen mode'}
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Telescope
|
-- Telescope
|
||||||
@ -153,6 +153,26 @@ wk.register({
|
|||||||
z = {':Telescope registers<CR>', 'Vim registers'}
|
z = {':Telescope registers<CR>', 'Vim registers'}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Git
|
||||||
|
g = {
|
||||||
|
name = 'Git',
|
||||||
|
b = 'Blame current line',
|
||||||
|
p = 'Preview hunk',
|
||||||
|
r = 'Reset hunk',
|
||||||
|
R = 'Reset all hunks in buffer',
|
||||||
|
s = 'Stage hunk',
|
||||||
|
u = 'Undo hunk',
|
||||||
|
n = {':Neogit<CR>', 'Neogit'},
|
||||||
|
f = {
|
||||||
|
name = 'Telescope',
|
||||||
|
a = {':Telescope git_stash<CR>', 'Stash'},
|
||||||
|
b = {':Telescope git_bcommits<CR>', 'Buffer commits'},
|
||||||
|
c = {':Telescope git_commits<CR>', 'Commits'},
|
||||||
|
m = {':Telescope git_branches<CR>', 'Branches'},
|
||||||
|
s = {':Telescope git_status<CR>', 'Status'}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
l = {
|
l = {
|
||||||
name = 'LSP',
|
name = 'LSP',
|
||||||
a = 'Add workspace folder',
|
a = 'Add workspace folder',
|
||||||
@ -177,6 +197,7 @@ wk.register({
|
|||||||
s = {':Telescope lsp_document_symbols<CR>', 'Buffer symbols'},
|
s = {':Telescope lsp_document_symbols<CR>', 'Buffer symbols'},
|
||||||
S = {':Telescope lsp_workspace_symbols<CR>', 'Workspace symbols'}
|
S = {':Telescope lsp_workspace_symbols<CR>', 'Workspace symbols'}
|
||||||
},
|
},
|
||||||
|
g = {':SymbolsOutline<CR>', 'Symbol outline'},
|
||||||
D = {'<Cmd>TroubleToggle lsp_definitions<CR>', 'Definition list'},
|
D = {'<Cmd>TroubleToggle lsp_definitions<CR>', 'Definition list'},
|
||||||
E = {'<Cmd>TroubleToggle lsp_document_diagnostics<CR>', 'Document diagnostics list'},
|
E = {'<Cmd>TroubleToggle lsp_document_diagnostics<CR>', 'Document diagnostics list'},
|
||||||
W = {'<Cmd>TroubleToggle lsp_workspace_diagnostics<CR>', 'Workspace diagnostics list'},
|
W = {'<Cmd>TroubleToggle lsp_workspace_diagnostics<CR>', 'Workspace diagnostics list'},
|
||||||
@ -184,25 +205,7 @@ wk.register({
|
|||||||
Q = {'<Cmd>TroubleToggle quickfix<CR>', 'Quickfix list'}
|
Q = {'<Cmd>TroubleToggle quickfix<CR>', 'Quickfix list'}
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Git
|
n = {':NnnPicker %:p:h<CR>', 'File picker'},
|
||||||
g = {
|
|
||||||
name = 'Git',
|
|
||||||
b = 'Blame current line',
|
|
||||||
p = 'Preview hunk',
|
|
||||||
r = 'Reset hunk',
|
|
||||||
R = 'Reset all hunks in buffer',
|
|
||||||
s = 'Stage hunk',
|
|
||||||
u = 'Undo hunk',
|
|
||||||
n = {':Neogit<CR>', 'Neogit'},
|
|
||||||
f = {
|
|
||||||
name = 'Telescope',
|
|
||||||
a = {':Telescope git_stash<CR>', 'Stash'},
|
|
||||||
b = {':Telescope git_bcommits<CR>', 'Buffer commits'},
|
|
||||||
c = {':Telescope git_commits<CR>', 'Commits'},
|
|
||||||
m = {':Telescope git_branches<CR>', 'Branches'},
|
|
||||||
s = {':Telescope git_status<CR>', 'Status'}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Tab related
|
-- Tab related
|
||||||
t = {
|
t = {
|
||||||
|
@ -2,7 +2,7 @@ local gl = require('galaxyline')
|
|||||||
local gls = gl.section
|
local gls = gl.section
|
||||||
local condition = require('galaxyline.condition')
|
local condition = require('galaxyline.condition')
|
||||||
|
|
||||||
gl.short_line_list = {'NvimTree', 'packer'}
|
gl.short_line_list = {'NvimTree', 'packer', 'Outline'}
|
||||||
|
|
||||||
local colors = require('colors.' .. vim.g.global_theme).colors
|
local colors = require('colors.' .. vim.g.global_theme).colors
|
||||||
|
|
||||||
|
20
home/.config/nvim/lua/modules/zen.lua
Normal file
20
home/.config/nvim/lua/modules/zen.lua
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
return require('zen-mode').setup {
|
||||||
|
window = {
|
||||||
|
options = {
|
||||||
|
signcolumn = 'no',
|
||||||
|
number = false,
|
||||||
|
relativenumber = false,
|
||||||
|
cursorline = false,
|
||||||
|
cursorcolumn = false,
|
||||||
|
foldcolumn = '0'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
on_open = function(win)
|
||||||
|
vim.cmd('TSContextDisable')
|
||||||
|
vim.cmd('IndentBlanklineDisable')
|
||||||
|
end,
|
||||||
|
on_close = function()
|
||||||
|
vim.cmd('TSContextEnable')
|
||||||
|
-- vim.cmd('IndentBlanklineEnable')
|
||||||
|
end,
|
||||||
|
}
|
@ -2,7 +2,7 @@ local opt = vim.opt
|
|||||||
|
|
||||||
local function load_options()
|
local function load_options()
|
||||||
vim.cmd('filetype indent plugin on')
|
vim.cmd('filetype indent plugin on')
|
||||||
vim.cmd('syntax enable')
|
vim.cmd('syntax on')
|
||||||
-- vim.cmd('set iskeyword+=-')
|
-- vim.cmd('set iskeyword+=-')
|
||||||
|
|
||||||
-- General settings
|
-- General settings
|
||||||
|
@ -140,6 +140,16 @@ return require('packer').startup(
|
|||||||
require('modules.lsptrouble')
|
require('modules.lsptrouble')
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
use {
|
||||||
|
'simrat39/symbols-outline.nvim',
|
||||||
|
cmd = {'SymbolsOutline', 'SymbolsOutlineOpen'},
|
||||||
|
setup = function()
|
||||||
|
vim.g.symbols_outline = {
|
||||||
|
highlight_hovered_item = false,
|
||||||
|
show_guides = false
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
use {
|
use {
|
||||||
'hrsh7th/nvim-compe',
|
'hrsh7th/nvim-compe',
|
||||||
event = 'InsertEnter',
|
event = 'InsertEnter',
|
||||||
@ -302,6 +312,15 @@ return require('packer').startup(
|
|||||||
run = 'npm install --prefix server',
|
run = 'npm install --prefix server',
|
||||||
cmd = 'Bracey'
|
cmd = 'Bracey'
|
||||||
}
|
}
|
||||||
|
use {
|
||||||
|
'folke/zen-mode.nvim',
|
||||||
|
cmd = 'ZenMode',
|
||||||
|
wants = 'twilight.nvim',
|
||||||
|
requires = {{'folke/twilight.nvim', opt = true}},
|
||||||
|
config = function()
|
||||||
|
require('modules.zen')
|
||||||
|
end
|
||||||
|
}
|
||||||
use {
|
use {
|
||||||
'akinsho/nvim-toggleterm.lua',
|
'akinsho/nvim-toggleterm.lua',
|
||||||
cmd = 'ToggleTerm',
|
cmd = 'ToggleTerm',
|
||||||
@ -320,7 +339,7 @@ return require('packer').startup(
|
|||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- TODO: lspsaga, orgmode.nvim, zen-mode.nvim, nvim-lint, format(ter).nvim, rest.nvim,
|
-- TODO: lspsaga, orgmode.nvim, nvim-lint, format(ter).nvim, rest.nvim, sqls.nvim,
|
||||||
-- sqls.nvim, symbols-outline.nvim, nvim-spectre, nvim-dap, dial.nvim, asynctasks.nvim
|
-- nvim-spectre, nvim-dap, dial.nvim, asynctasks.nvim
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user