nvim: add indent-blankline.nvim, committia, conflict-marker, and modify listchars
This commit is contained in:
parent
d61794254c
commit
470741071d
3 changed files with 47 additions and 28 deletions
|
@ -169,6 +169,23 @@ M.neoscroll = function()
|
||||||
end
|
end
|
||||||
-- <<<
|
-- <<<
|
||||||
|
|
||||||
|
-- indent_blankline >>>
|
||||||
|
M.indent_blankline = function()
|
||||||
|
vim.cmd [[
|
||||||
|
let g:indent_blankline_show_first_indent_level = v:true
|
||||||
|
let g:indent_blankline_show_foldtext = v:false
|
||||||
|
let g:indent_blankline_buftype_exclude = ['terminal']
|
||||||
|
let g:indent_blankline_use_treesitter = v:true
|
||||||
|
let g:indent_blankline_show_current_context = v:true
|
||||||
|
]]
|
||||||
|
require("indent_blankline").setup {
|
||||||
|
-- for example, context is off by default, use this to turn it on
|
||||||
|
show_current_context = true,
|
||||||
|
show_current_context_start = true,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
-- <<<
|
||||||
|
|
||||||
-- ZenMode >>>
|
-- ZenMode >>>
|
||||||
M.zenmode = function()
|
M.zenmode = function()
|
||||||
-- map :ZM to :ZenMode
|
-- map :ZM to :ZenMode
|
||||||
|
|
|
@ -223,19 +223,14 @@ return require('packer').startup({function()
|
||||||
-- 'ggandor/lightspeed.nvim',
|
-- 'ggandor/lightspeed.nvim',
|
||||||
-- }
|
-- }
|
||||||
use { -- indentline: Line indent indicators
|
use { -- indentline: Line indent indicators
|
||||||
'Yggdroot/indentLine',
|
'lukas-reineke/indent-blankline.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd [[
|
require('blake.other').indent_blankline()
|
||||||
let g:indentLine_char = '▏'
|
|
||||||
let g:indentLine_conceallevel = 1
|
|
||||||
let g:indentLine_fileTypeExclude = ['markdown', 'help', 'packer']
|
|
||||||
autocmd TermOpen * IndentLinesDisable
|
|
||||||
]]
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
use { -- targets.vim: fix ci' and other things to work right
|
-- use { -- targets.vim: fix ci' and other things to work right
|
||||||
'wellle/targets.vim',
|
-- 'wellle/targets.vim',
|
||||||
}
|
-- }
|
||||||
|
|
||||||
-- Conveniences
|
-- Conveniences
|
||||||
use { -- Ghost: Web browser integration
|
use { -- Ghost: Web browser integration
|
||||||
|
@ -250,26 +245,29 @@ return require('packer').startup({function()
|
||||||
vim.api.nvim_set_keymap('n', '<F5>', '<cmd>UndotreeToggle<CR>', { noremap = true, silent = true, })
|
vim.api.nvim_set_keymap('n', '<F5>', '<cmd>UndotreeToggle<CR>', { noremap = true, silent = true, })
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
-- use { -- Dim inactive window
|
-- use { -- Dim inactive window
|
||||||
-- 'sunjon/shade.nvim',
|
-- 'sunjon/shade.nvim',
|
||||||
-- config = function()
|
-- config = function()
|
||||||
-- require'shade'.setup({
|
-- require'shade'.setup({
|
||||||
-- overlay_opacity = 50,
|
-- overlay_opacity = 50,
|
||||||
-- opacity_step = 1,
|
-- opacity_step = 1,
|
||||||
-- keys = {
|
-- keys = {
|
||||||
-- brightness_up = '<C-Up>',
|
-- brightness_up = '<C-Up>',
|
||||||
-- brightness_down = '<C-Down>',
|
-- brightness_down = '<C-Down>',
|
||||||
-- toggle = '<Leader>s',
|
-- toggle = '<Leader>s',
|
||||||
-- }
|
-- }
|
||||||
-- })
|
-- })
|
||||||
-- end
|
-- end
|
||||||
-- }
|
-- }
|
||||||
use { -- Quote pairing
|
use { -- Quote pairing
|
||||||
'windwp/nvim-autopairs',
|
'windwp/nvim-autopairs',
|
||||||
config = function()
|
config = function()
|
||||||
require('nvim-autopairs').setup()
|
require('nvim-autopairs').setup()
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
use { -- accelerated jk movement
|
||||||
|
'rhysd/accelerated-jk'
|
||||||
|
}
|
||||||
use { -- Alignment
|
use { -- Alignment
|
||||||
'junegunn/vim-easy-align',
|
'junegunn/vim-easy-align',
|
||||||
}
|
}
|
||||||
|
@ -284,10 +282,8 @@ return require('packer').startup({function()
|
||||||
-- Only calculate commentstring for tsx filetypes
|
-- Only calculate commentstring for tsx filetypes
|
||||||
if vim.bo.filetype == 'typescriptreact' then
|
if vim.bo.filetype == 'typescriptreact' then
|
||||||
local U = require('Comment.utils')
|
local U = require('Comment.utils')
|
||||||
|
|
||||||
-- Detemine whether to use linewise or blockwise commentstring
|
-- Detemine whether to use linewise or blockwise commentstring
|
||||||
local type = ctx.ctype == U.ctype.line and '__default' or '__multiline'
|
local type = ctx.ctype == U.ctype.line and '__default' or '__multiline'
|
||||||
|
|
||||||
-- Determine the location where to calculate commentstring from
|
-- Determine the location where to calculate commentstring from
|
||||||
local location = nil
|
local location = nil
|
||||||
if ctx.ctype == U.ctype.block then
|
if ctx.ctype == U.ctype.block then
|
||||||
|
@ -295,7 +291,6 @@ return require('packer').startup({function()
|
||||||
elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
|
elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
|
||||||
location = require('ts_context_commentstring.utils').get_visual_start_location()
|
location = require('ts_context_commentstring.utils').get_visual_start_location()
|
||||||
end
|
end
|
||||||
|
|
||||||
return require('ts_context_commentstring.internal').calculate_commentstring({
|
return require('ts_context_commentstring.internal').calculate_commentstring({
|
||||||
key = type,
|
key = type,
|
||||||
location = location,
|
location = location,
|
||||||
|
@ -305,6 +300,12 @@ return require('packer').startup({function()
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
use { -- rhysd: committia: better commit editing window
|
||||||
|
'rhysd/committia.vim',
|
||||||
|
}
|
||||||
|
use { -- rhysd: conflict-marker: mark git conflicts - [x ]x
|
||||||
|
'rhysd/conflict-marker.vim',
|
||||||
|
}
|
||||||
-- use { -- lewis6991: spellsitter: Spell checking in treesitter files
|
-- use { -- lewis6991: spellsitter: Spell checking in treesitter files
|
||||||
-- 'lewis6991/spellsitter.nvim',
|
-- 'lewis6991/spellsitter.nvim',
|
||||||
-- config = function()
|
-- config = function()
|
||||||
|
|
|
@ -38,7 +38,8 @@ set.showcmd = true
|
||||||
set.signcolumn = 'yes'
|
set.signcolumn = 'yes'
|
||||||
set.makeprg = 'make -j$(nproc)'
|
set.makeprg = 'make -j$(nproc)'
|
||||||
set.ruler = false
|
set.ruler = false
|
||||||
set.listchars = "eol:↴,trail:~,tab:'»',nbsp:␣,space:·"
|
set.listchars = "trail:~,tab:│ ,nbsp:␣,lead:·,extends:…,precedes:…"
|
||||||
|
set.list = false
|
||||||
|
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
--- Key bindings (needs to be translated?) ---
|
--- Key bindings (needs to be translated?) ---
|
||||||
|
|
Loading…
Add table
Reference in a new issue