nvim: add indent-blankline.nvim, committia, conflict-marker, and modify listchars

This commit is contained in:
PowerUser64 2022-01-21 17:41:25 -08:00
parent d61794254c
commit 470741071d
3 changed files with 47 additions and 28 deletions

View file

@ -169,6 +169,23 @@ M.neoscroll = function()
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 >>>
M.zenmode = function()
-- map :ZM to :ZenMode

View file

@ -223,19 +223,14 @@ return require('packer').startup({function()
-- 'ggandor/lightspeed.nvim',
-- }
use { -- indentline: Line indent indicators
'Yggdroot/indentLine',
'lukas-reineke/indent-blankline.nvim',
config = function()
vim.cmd [[
let g:indentLine_char = ''
let g:indentLine_conceallevel = 1
let g:indentLine_fileTypeExclude = ['markdown', 'help', 'packer']
autocmd TermOpen * IndentLinesDisable
]]
require('blake.other').indent_blankline()
end
}
use { -- targets.vim: fix ci' and other things to work right
'wellle/targets.vim',
}
-- use { -- targets.vim: fix ci' and other things to work right
-- 'wellle/targets.vim',
-- }
-- Conveniences
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, })
end
}
-- use { -- Dim inactive window
-- 'sunjon/shade.nvim',
-- config = function()
-- require'shade'.setup({
-- overlay_opacity = 50,
-- opacity_step = 1,
-- keys = {
-- brightness_up = '<C-Up>',
-- brightness_down = '<C-Down>',
-- toggle = '<Leader>s',
-- }
-- })
-- end
-- }
-- use { -- Dim inactive window
-- 'sunjon/shade.nvim',
-- config = function()
-- require'shade'.setup({
-- overlay_opacity = 50,
-- opacity_step = 1,
-- keys = {
-- brightness_up = '<C-Up>',
-- brightness_down = '<C-Down>',
-- toggle = '<Leader>s',
-- }
-- })
-- end
-- }
use { -- Quote pairing
'windwp/nvim-autopairs',
config = function()
require('nvim-autopairs').setup()
end
}
use { -- accelerated jk movement
'rhysd/accelerated-jk'
}
use { -- Alignment
'junegunn/vim-easy-align',
}
@ -284,10 +282,8 @@ return require('packer').startup({function()
-- Only calculate commentstring for tsx filetypes
if vim.bo.filetype == 'typescriptreact' then
local U = require('Comment.utils')
-- Detemine whether to use linewise or blockwise commentstring
local type = ctx.ctype == U.ctype.line and '__default' or '__multiline'
-- Determine the location where to calculate commentstring from
local location = nil
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
location = require('ts_context_commentstring.utils').get_visual_start_location()
end
return require('ts_context_commentstring.internal').calculate_commentstring({
key = type,
location = location,
@ -305,6 +300,12 @@ return require('packer').startup({function()
}
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
-- 'lewis6991/spellsitter.nvim',
-- config = function()

View file

@ -38,7 +38,8 @@ set.showcmd = true
set.signcolumn = 'yes'
set.makeprg = 'make -j$(nproc)'
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?) ---