Compare commits
15 commits
a3b00c4693
...
fadacf5313
Author | SHA1 | Date | |
---|---|---|---|
fadacf5313 | |||
14f33460df | |||
892544df8e | |||
27860162b4 | |||
86fdfbe3d5 | |||
af6e91561b | |||
ff3b4ef605 | |||
0220f7f03f | |||
03a4148796 | |||
26c3124e95 | |||
84714379ab | |||
7fbdbf0203 | |||
ba5d5d2561 | |||
e3b2f0f0e5 | |||
9628ff30b9 |
13 changed files with 226 additions and 197 deletions
|
@ -9,6 +9,7 @@
|
||||||
pushmerge = "push -o merge_request.merge_when_pipeline_succeeds" # see https://docs.gitlab.com/ce/user/project/push_options.html # merge-when-pipeline-succeeds-alias
|
pushmerge = "push -o merge_request.merge_when_pipeline_succeeds" # see https://docs.gitlab.com/ce/user/project/push_options.html # merge-when-pipeline-succeeds-alias
|
||||||
last = "diff HEAD~ HEAD"
|
last = "diff HEAD~ HEAD"
|
||||||
pushall = "!git remote | xargs -I R git push R" # push to all connected remotes
|
pushall = "!git remote | xargs -I R git push R" # push to all connected remotes
|
||||||
|
fetchall = "!git remote | xargs -I R git fetch R" # fetch from all connected remotes
|
||||||
|
|
||||||
[commit]
|
[commit]
|
||||||
gpgsign = true # sign commits as me
|
gpgsign = true # sign commits as me
|
||||||
|
|
|
@ -47,6 +47,7 @@ alias glog='git log --stat'
|
||||||
alias gloog='git log --stat -p'
|
alias gloog='git log --stat -p'
|
||||||
|
|
||||||
alias gf='git fetch'
|
alias gf='git fetch'
|
||||||
|
alias gfa='git fetchall'
|
||||||
alias gl='git pull'
|
alias gl='git pull'
|
||||||
|
|
||||||
alias gpn='git push --dry-run'
|
alias gpn='git push --dry-run'
|
||||||
|
|
|
@ -11,15 +11,18 @@ require('maps')
|
||||||
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
|
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
|
||||||
command = 'silent! lua require"vim.highlight".on_yank{timeout=500}',
|
command = 'silent! lua require"vim.highlight".on_yank{timeout=500}',
|
||||||
desc = "Highlight yanked text whenevery yanking something",
|
desc = "Highlight yanked text whenevery yanking something",
|
||||||
group = vim.api.nvim_create_augroup('highlightyanks', { clear = true }),
|
group = vim.api.nvim_create_augroup('highlightyanks', { clear = true })
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Special setting for editing gopass files - make sure nothing leaks outside the directories it is supposed to
|
-- Special setting for editing gopass files - make sure nothing leaks outside the directories it is supposed to
|
||||||
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
|
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
|
||||||
pattern = { "/dev/shm/gopass.*", "/dev/shm/pass.?*/?*.txt", "$TMPDIR/pass.?*/?*.txt", "/tmp/pass.?*/?*.txt" },
|
pattern = {
|
||||||
|
"/dev/shm/gopass.*", "/dev/shm/pass.?*/?*.txt",
|
||||||
|
"$TMPDIR/pass.?*/?*.txt", "/tmp/pass.?*/?*.txt"
|
||||||
|
},
|
||||||
command = 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=',
|
command = 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=',
|
||||||
desc = "Don't leak any information when editing potential password files",
|
desc = "Don't leak any information when editing potential password files",
|
||||||
group = vim.api.nvim_create_augroup('passnoleak', { clear = true }),
|
group = vim.api.nvim_create_augroup('passnoleak', { clear = true })
|
||||||
})
|
})
|
||||||
|
|
||||||
api.nvim_exec('runtime abbrev.vim', false)
|
api.nvim_exec('runtime abbrev.vim', false)
|
||||||
|
@ -31,5 +34,5 @@ vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||||
vim.defer_fn(function() vim.loop.kill(pid, WINCH) end, 20)
|
vim.defer_fn(function() vim.loop.kill(pid, WINCH) end, 20)
|
||||||
end,
|
end,
|
||||||
desc = "Fix neovim sizing issues if opening same time as alacritty",
|
desc = "Fix neovim sizing issues if opening same time as alacritty",
|
||||||
group = vim.api.nvim_create_augroup('alacritty_fixsize', { clear = true }),
|
group = vim.api.nvim_create_augroup('alacritty_fixsize', { clear = true })
|
||||||
})
|
})
|
||||||
|
|
|
@ -4,6 +4,23 @@ require('nvim-autopairs').setup({check_ts = true})
|
||||||
local npairs = require 'nvim-autopairs'
|
local npairs = require 'nvim-autopairs'
|
||||||
local Rule = require 'nvim-autopairs.rule'
|
local Rule = require 'nvim-autopairs.rule'
|
||||||
|
|
||||||
|
npairs.setup({
|
||||||
|
check_ts = true,
|
||||||
|
ts_config = {
|
||||||
|
lua = { 'string' }, -- it will not add a pair on that treesitter node
|
||||||
|
javascript = { 'template_string' },
|
||||||
|
java = false -- don't check treesitter on java
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
local ts_conds = require('nvim-autopairs.ts-conds')
|
||||||
|
|
||||||
|
-- press % => %% only while inside a comment or string
|
||||||
|
npairs.add_rules({
|
||||||
|
Rule("%", "%", "lua"):with_pair(ts_conds.is_ts_node({ 'string', 'comment' })),
|
||||||
|
Rule("$", "$", "lua"):with_pair(ts_conds.is_not_ts_node({ 'function' }))
|
||||||
|
})
|
||||||
|
|
||||||
npairs.add_rules {
|
npairs.add_rules {
|
||||||
Rule(' ', ' '):with_pair(function(opts)
|
Rule(' ', ' '):with_pair(function(opts)
|
||||||
local pair = opts.line:sub(opts.col, opts.col + 1)
|
local pair = opts.line:sub(opts.col, opts.col + 1)
|
||||||
|
@ -14,5 +31,3 @@ local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||||
local cmp = require('cmp')
|
local cmp = require('cmp')
|
||||||
cmp.event:on('confirm_done',
|
cmp.event:on('confirm_done',
|
||||||
cmp_autopairs.on_confirm_done({ map_char = { tex = '' } }))
|
cmp_autopairs.on_confirm_done({ map_char = { tex = '' } }))
|
||||||
-- add a lisp filetype (wrap my-function), FYI: Hardcoded = { "clojure", "clojurescript", "fennel", "janet" }
|
|
||||||
cmp_autopairs.lisp[#cmp_autopairs.lisp + 1] = "racket"
|
|
||||||
|
|
92
nvim/.config/nvim/lua/plug/_cmp.lua
Normal file
92
nvim/.config/nvim/lua/plug/_cmp.lua
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
local cmp = require 'cmp'
|
||||||
|
local lspkind = require 'lspkind'
|
||||||
|
|
||||||
|
local has_words_before = function()
|
||||||
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
|
return col ~= 0 and
|
||||||
|
vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col,
|
||||||
|
col)
|
||||||
|
:match("%s") == nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local feedkey = function(key, mode)
|
||||||
|
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true),
|
||||||
|
mode, true)
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.o.completeopt = "menu,menuone,noselect"
|
||||||
|
|
||||||
|
-- completion items
|
||||||
|
require('cmp').register_source('vCard', require('completion_vcard').setup_cmp(
|
||||||
|
'~/documents/contacts/myconts'))
|
||||||
|
vim.g.vsnip_snippet_dir = (vim.env.XDG_DATA_HOME or "~/.local/share") ..
|
||||||
|
"/nvim/snippets"
|
||||||
|
cmp.setup({
|
||||||
|
snippet = { expand = function(args) vim.fn["vsnip#anonymous"](args.body) end },
|
||||||
|
mapping = {
|
||||||
|
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
|
||||||
|
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
|
||||||
|
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
|
||||||
|
['<C-y>'] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
|
||||||
|
['<C-e>'] = cmp.mapping({
|
||||||
|
i = cmp.mapping.abort(),
|
||||||
|
c = cmp.mapping.close()
|
||||||
|
}),
|
||||||
|
-- Accept currently selected item. If none selected, `select` first item.
|
||||||
|
-- Set `select` to `false` to only confirm explicitly selected items.
|
||||||
|
['<CR>'] = cmp.mapping.confirm({ select = false }),
|
||||||
|
["<C-n>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif vim.fn["vsnip#available"](1) == 1 then
|
||||||
|
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
||||||
|
elseif has_words_before() then
|
||||||
|
cmp.complete()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
|
||||||
|
["<C-p>"] = cmp.mapping(function()
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
|
||||||
|
feedkey("<Plug>(vsnip-jump-prev)", "")
|
||||||
|
end
|
||||||
|
end, { "i", "s" })
|
||||||
|
},
|
||||||
|
formatting = {
|
||||||
|
format = lspkind.cmp_format({
|
||||||
|
with_text = false,
|
||||||
|
menu = ({
|
||||||
|
buffer = "B",
|
||||||
|
nvim_lua = "NLua",
|
||||||
|
tmux = "τ",
|
||||||
|
vCard = "VCARD"
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'path' }, { name = 'nvim_lsp' }, { name = 'treesitter' },
|
||||||
|
{ name = 'tmux' }, { name = 'vsnip' }, { name = 'latex_symbols' },
|
||||||
|
{ name = 'vCard' }, { name = 'nvim_lua' }
|
||||||
|
}, { { name = 'buffer' }, { name = 'spell' } })
|
||||||
|
})
|
||||||
|
|
||||||
|
if vim.o.ft == 'clap_input' and vim.o.ft == 'guihua' and vim.o.ft ==
|
||||||
|
'guihua_rust' then require 'cmp'.setup.buffer { completion = { enable = false } } end
|
||||||
|
|
||||||
|
-- Use buffer source for `/` search
|
||||||
|
cmp.setup.cmdline('/', {
|
||||||
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
|
sources = cmp.config.sources({ { name = 'buffer' } })
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Use cmdline & path source for ':' in vim
|
||||||
|
cmp.setup.cmdline(':', {
|
||||||
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
|
sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } })
|
||||||
|
})
|
||||||
|
|
||||||
|
require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol
|
||||||
|
.make_client_capabilities())
|
|
@ -1,5 +1,3 @@
|
||||||
local augroup = require('helpers.augroup')
|
|
||||||
|
|
||||||
-- for each filetype autoformat on save
|
-- for each filetype autoformat on save
|
||||||
-- TODO can automatically gather from formatter table keys?
|
-- TODO can automatically gather from formatter table keys?
|
||||||
local prettierfmt = {
|
local prettierfmt = {
|
||||||
|
|
40
nvim/.config/nvim/lua/plug/_gitsigns.lua
Normal file
40
nvim/.config/nvim/lua/plug/_gitsigns.lua
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
-- require('gitsigns').setup {
|
||||||
|
-- on_attach = function(bufnr)
|
||||||
|
-- local gs = package.loaded.gitsigns
|
||||||
|
--
|
||||||
|
-- local function map(mode, l, r, opts)
|
||||||
|
-- opts = opts or {}
|
||||||
|
-- opts.buffer = bufnr
|
||||||
|
-- vim.keymap.set(mode, l, r, opts)
|
||||||
|
-- end
|
||||||
|
--
|
||||||
|
-- -- Navigation
|
||||||
|
-- map('n', ']h', function()
|
||||||
|
-- if vim.wo.diff then return ']h' end
|
||||||
|
-- vim.schedule(function() gs.next_hunk() end)
|
||||||
|
-- return '<Ignore>'
|
||||||
|
-- end, {expr = true})
|
||||||
|
--
|
||||||
|
-- map('n', '[h', function()
|
||||||
|
-- if vim.wo.diff then return '[h' end
|
||||||
|
-- vim.schedule(function() gs.prev_hunk() end)
|
||||||
|
-- return '<Ignore>'
|
||||||
|
-- end, {expr = true})
|
||||||
|
--
|
||||||
|
-- -- Actions
|
||||||
|
-- map({'n', 'v'}, '<leader>hs', ':Gitsigns stage_hunk<CR>')
|
||||||
|
-- map('n', '<leader>hS', gs.stage_buffer)
|
||||||
|
-- map({'n', 'v'}, '<leader>hr', ':Gitsigns reset_hunk<CR>')
|
||||||
|
-- map('n', '<leader>hR', gs.reset_buffer)
|
||||||
|
-- map('n', '<leader>hu', gs.undo_stage_hunk)
|
||||||
|
-- map('n', '<leader>hp', gs.preview_hunk)
|
||||||
|
-- map('n', '<leader>hb', function() gs.blame_line {full = true} end)
|
||||||
|
-- map('n', '<leader>hB', gs.toggle_current_line_blame)
|
||||||
|
-- map('n', '<leader>hd', gs.diffthis)
|
||||||
|
-- map('n', '<leader>hD', function() gs.diffthis('~') end)
|
||||||
|
-- map('n', '<leader>hdd', gs.toggle_deleted)
|
||||||
|
--
|
||||||
|
-- -- Text object
|
||||||
|
-- map({'o', 'x'}, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
|
||||||
|
-- end
|
||||||
|
-- }
|
|
@ -1,154 +1,3 @@
|
||||||
local cmp = require 'cmp'
|
|
||||||
local lspkind = require 'lspkind'
|
|
||||||
|
|
||||||
local has_words_before = function()
|
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
|
||||||
return col ~= 0 and
|
|
||||||
vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col,
|
|
||||||
col)
|
|
||||||
:match("%s") == nil
|
|
||||||
end
|
|
||||||
|
|
||||||
local feedkey = function(key, mode)
|
|
||||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true),
|
|
||||||
mode, true)
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.o.completeopt = "menu,menuone,noselect"
|
|
||||||
|
|
||||||
-- completion items
|
|
||||||
require('cmp').register_source('vCard', require('completion_vcard').setup_cmp(
|
|
||||||
'~/documents/contacts/myconts'))
|
|
||||||
vim.g.vsnip_snippet_dir = (vim.env.XDG_DATA_HOME or "~/.local/share") ..
|
|
||||||
"/nvim/snippets"
|
|
||||||
cmp.setup({
|
|
||||||
snippet = {expand = function(args) vim.fn["vsnip#anonymous"](args.body) end},
|
|
||||||
mapping = {
|
|
||||||
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), {'i', 'c'}),
|
|
||||||
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), {'i', 'c'}),
|
|
||||||
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), {'i', 'c'}),
|
|
||||||
['<C-y>'] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
|
|
||||||
['<C-e>'] = cmp.mapping({
|
|
||||||
i = cmp.mapping.abort(),
|
|
||||||
c = cmp.mapping.close()
|
|
||||||
}),
|
|
||||||
-- Accept currently selected item. If none selected, `select` first item.
|
|
||||||
-- Set `select` to `false` to only confirm explicitly selected items.
|
|
||||||
['<CR>'] = cmp.mapping.confirm({select = false}),
|
|
||||||
["<C-n>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif vim.fn["vsnip#available"](1) == 1 then
|
|
||||||
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
|
||||||
elseif has_words_before() then
|
|
||||||
cmp.complete()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, {"i", "s"}),
|
|
||||||
|
|
||||||
["<C-p>"] = cmp.mapping(function()
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
|
|
||||||
feedkey("<Plug>(vsnip-jump-prev)", "")
|
|
||||||
end
|
|
||||||
end, {"i", "s"})
|
|
||||||
},
|
|
||||||
formatting = {
|
|
||||||
format = lspkind.cmp_format({
|
|
||||||
with_text = false,
|
|
||||||
menu = ({
|
|
||||||
buffer = "B",
|
|
||||||
nvim_lua = "NLua",
|
|
||||||
tmux = "τ",
|
|
||||||
vCard = "VCARD"
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{name = 'path'}, {name = 'nvim_lsp'}, {name = 'treesitter'},
|
|
||||||
{name = 'tmux'}, {name = 'vsnip'}, {name = 'latex_symbols'},
|
|
||||||
{name = 'pandoc_references'}, {name = 'vCard'}
|
|
||||||
}, {{name = 'buffer'}, {name = 'spell'}})
|
|
||||||
})
|
|
||||||
if vim.o.ft == 'clap_input' and vim.o.ft == 'guihua' and vim.o.ft ==
|
|
||||||
'guihua_rust' then require'cmp'.setup.buffer {completion = {enable = false}} end
|
|
||||||
|
|
||||||
-- Use buffer source for `/` search
|
|
||||||
cmp.setup.cmdline('/', {sources = {{name = 'buffer'}}})
|
|
||||||
|
|
||||||
-- Use cmdline & path source for ':' in vim
|
|
||||||
cmp.setup.cmdline(':', {
|
|
||||||
sources = cmp.config.sources({{name = 'path'}}, {{name = 'cmdline'}})
|
|
||||||
})
|
|
||||||
|
|
||||||
require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol
|
|
||||||
.make_client_capabilities())
|
|
||||||
|
|
||||||
-- requires the lua-language-server package to be installed
|
|
||||||
-- The arch package defaults to the following directory
|
-- The arch package defaults to the following directory
|
||||||
local sumneko_root_path = "/usr/share/lua-language-server"
|
require'navigator'.setup()
|
||||||
require'navigator'.setup({
|
|
||||||
lsp = {
|
|
||||||
servers = {'efm'},
|
|
||||||
disable_lsp = {"pylsp", "jedi_language_server"},
|
|
||||||
sumneko_lua = {
|
|
||||||
cmd = {
|
|
||||||
"lua-language-server", "-E", sumneko_root_path .. "/main.lua"
|
|
||||||
},
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
runtime = {
|
|
||||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
|
||||||
version = 'LuaJIT',
|
|
||||||
-- Setup your lua path
|
|
||||||
path = vim.split(package.path, ';')
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
-- Get the language server to recognize additional globals
|
|
||||||
globals = {
|
|
||||||
'vim', 'before_each', 'after_each', 'describe',
|
|
||||||
'it', 'mock', 'stub'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
workspace = {
|
|
||||||
-- Make the server aware of additional runtime files
|
|
||||||
library = {
|
|
||||||
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
|
|
||||||
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
|
|
||||||
["/usr/share/lua/5.1/busted/"] = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
efm = {
|
|
||||||
init_options = {
|
|
||||||
documentFormatting = true,
|
|
||||||
codeAction = true,
|
|
||||||
completion = true,
|
|
||||||
documentSymbol = true,
|
|
||||||
hover = true
|
|
||||||
},
|
|
||||||
filetypes = {"sh"},
|
|
||||||
settings = {
|
|
||||||
rootMarkers = {".git/"},
|
|
||||||
languages = {
|
|
||||||
sh = {
|
|
||||||
{
|
|
||||||
lintCommand = 'shellcheck -f gcc -x',
|
|
||||||
lintFormats = {
|
|
||||||
'%f:%l:%c: %trror: %m',
|
|
||||||
'%f:%l:%c: %tarning: %m', '%f:%l:%c: %tote: %m'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{formatCommand = 'shfmt -ci -s -bn', formatStdin = true}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
require"lsp_signature".setup()
|
require"lsp_signature".setup()
|
||||||
|
|
8
nvim/.config/nvim/lua/plug/_neorg.lua
Normal file
8
nvim/.config/nvim/lua/plug/_neorg.lua
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
require("neorg").setup {
|
||||||
|
load = {
|
||||||
|
["core.defaults"] = {},
|
||||||
|
["core.norg.concealer"] = {},
|
||||||
|
["core.norg.completion"] = { config = { engine = "nvim-cmp" } },
|
||||||
|
["core.norg.qol.toc"] = {}
|
||||||
|
}
|
||||||
|
}
|
|
@ -34,11 +34,7 @@ require("packer").startup(function()
|
||||||
'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter
|
'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter
|
||||||
requires = { 'nvim-lua/plenary.nvim' },
|
requires = { 'nvim-lua/plenary.nvim' },
|
||||||
tag = 'release',
|
tag = 'release',
|
||||||
config = function()
|
config = function() require('plug._gitsigns') end,
|
||||||
require('gitsigns').setup {
|
|
||||||
keymaps = {['n ]c'] = nil, ['n [c'] = nil}
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
event = "BufRead"
|
event = "BufRead"
|
||||||
}
|
}
|
||||||
use {
|
use {
|
||||||
|
@ -53,7 +49,12 @@ require("packer").startup(function()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- editing
|
-- editing
|
||||||
use {'machakann/vim-sandwich', event = "BufRead"} -- surround things with other things using sa/sd/sr
|
-- use {'machakann/vim-sandwich', event = "BufRead"} -- surround things with other things using sa/sd/sr
|
||||||
|
use {
|
||||||
|
'kylechui/nvim-surround',
|
||||||
|
tag = '*',
|
||||||
|
config = function() require('nvim-surround').setup() end
|
||||||
|
} -- surround things with other things using ys/cs/ds
|
||||||
use {
|
use {
|
||||||
'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers
|
'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers
|
||||||
event = "BufRead"
|
event = "BufRead"
|
||||||
|
@ -92,9 +93,14 @@ require("packer").startup(function()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- writing
|
-- writing
|
||||||
use {'vim-pandoc/vim-pandoc-syntax', ft = 'pandoc'}
|
use { 'vim-pandoc/vim-pandoc-syntax' }
|
||||||
use {'vim-pandoc/vim-pandoc', ft = 'pandoc'}
|
use { 'vim-pandoc/vim-pandoc' }
|
||||||
use {'vim-pandoc/vim-criticmarkup', ft = 'pandoc'} -- highlights for criticmarkup
|
use { 'vim-pandoc/vim-criticmarkup' }
|
||||||
|
use {
|
||||||
|
"quarto-dev/quarto-vim",
|
||||||
|
requires = { { "vim-pandoc/vim-pandoc-syntax" } },
|
||||||
|
ft = { "quarto" }
|
||||||
|
}
|
||||||
use 'micarmst/vim-spellsync' -- personal dict improvements for git sync
|
use 'micarmst/vim-spellsync' -- personal dict improvements for git sync
|
||||||
use { -- provide distraction free writing
|
use { -- provide distraction free writing
|
||||||
'Pocco81/TrueZen.nvim',
|
'Pocco81/TrueZen.nvim',
|
||||||
|
@ -114,6 +120,7 @@ require("packer").startup(function()
|
||||||
|
|
||||||
-- languages
|
-- languages
|
||||||
use { 'euclidianAce/BetterLua.vim', ft = 'lua' } -- better syntax highlighting for lua
|
use { 'euclidianAce/BetterLua.vim', ft = 'lua' } -- better syntax highlighting for lua
|
||||||
|
use 'aliou/bats.vim' -- enable syntax for bats shell-code testing library
|
||||||
|
|
||||||
-- REPL work
|
-- REPL work
|
||||||
use {
|
use {
|
||||||
|
@ -156,6 +163,13 @@ require("packer").startup(function()
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
config = function() require("which-key").setup {} end
|
config = function() require("which-key").setup {} end
|
||||||
}
|
}
|
||||||
|
-- extensive organization plugin mimicking orgmode
|
||||||
|
use {
|
||||||
|
"nvim-neorg/neorg",
|
||||||
|
config = function() require("plug._neorg") end,
|
||||||
|
requires = "nvim-lua/plenary.nvim",
|
||||||
|
tag = "*"
|
||||||
|
}
|
||||||
|
|
||||||
-- fuzzy matching
|
-- fuzzy matching
|
||||||
use {
|
use {
|
||||||
|
@ -206,11 +220,15 @@ require("packer").startup(function()
|
||||||
|
|
||||||
-- lsp
|
-- lsp
|
||||||
use 'neovim/nvim-lspconfig' -- some commong language server configurations
|
use 'neovim/nvim-lspconfig' -- some commong language server configurations
|
||||||
use 'simrat39/symbols-outline.nvim' -- vista-like outline view for code
|
use {
|
||||||
|
'simrat39/symbols-outline.nvim',
|
||||||
|
config = function() require('symbols-outline').setup() end
|
||||||
|
} -- vista-like outline view for code
|
||||||
use 'ray-x/lsp_signature.nvim'
|
use 'ray-x/lsp_signature.nvim'
|
||||||
use {
|
use {
|
||||||
'ray-x/navigator.lua',
|
'ray-x/navigator.lua',
|
||||||
requires = {'ray-x/guihua.lua', run = 'cd lua/fzy && make'}
|
requires = { 'ray-x/guihua.lua', run = 'cd lua/fzy && make' },
|
||||||
|
config = function() require('plug._lsp') end
|
||||||
}
|
}
|
||||||
-- and completion
|
-- and completion
|
||||||
use {
|
use {
|
||||||
|
@ -218,12 +236,12 @@ require("packer").startup(function()
|
||||||
requires = {
|
requires = {
|
||||||
'onsails/lspkind-nvim', 'andersevenrud/cmp-tmux', -- completion source from adjacent tmux panes
|
'onsails/lspkind-nvim', 'andersevenrud/cmp-tmux', -- completion source from adjacent tmux panes
|
||||||
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path',
|
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path',
|
||||||
'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-vsnip',
|
'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-vsnip', 'hrsh7th/cmp-nvim-lua',
|
||||||
'kdheepak/cmp-latex-symbols', 'ray-x/cmp-treesitter',
|
'kdheepak/cmp-latex-symbols', 'ray-x/cmp-treesitter',
|
||||||
'f3fora/cmp-spell', 'jc-doyle/cmp-pandoc-references',
|
'f3fora/cmp-spell', 'cbarrete/completion-vcard'
|
||||||
'cbarrete/completion-vcard'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
require('plug._lsp')
|
require('plug._cmp')
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
" PLUGIN: vim-pandoc
|
" PLUGIN: vim-pandoc
|
||||||
" handle markdown files with pandoc (and pandoc syntax!)
|
" handle markdown files with pandoc (and pandoc syntax!)
|
||||||
let g:pandoc#modules#disabled = [ "keyboard", "folding" ]
|
let g:pandoc#modules#disabled = [ "keyboard", "folding" ]
|
||||||
let g:pandoc#filetypes#pandoc_markdown = 1
|
let g:pandoc#filetypes#pandoc_markdown = 0
|
||||||
let g:pandoc#filetypes#handled = [ "extra", "latex", "markdown", "pandoc", "rst", "textile"]
|
let g:pandoc#filetypes#handled = [ "extra", "latex", "markdown", "pandoc", "rst", "textile"]
|
||||||
" disable all default keymaps
|
" disable all default keymaps
|
||||||
let g:pandoc#keyboard#use_default_mappings=0
|
let g:pandoc#keyboard#use_default_mappings=0
|
||||||
|
|
|
@ -177,3 +177,4 @@ ascriptions
|
||||||
exploitations
|
exploitations
|
||||||
tradeable
|
tradeable
|
||||||
reproducability
|
reproducability
|
||||||
|
positivity
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Layout of this conf file:
|
# Layout of this conf file:
|
||||||
# 1. Global Settings
|
# 1. Global Settings
|
||||||
# 2. Keybinds
|
# 2. Plugins
|
||||||
# 3. Keybinds
|
# 3. Keybinds
|
||||||
# 4. Theme
|
# 4. Theme
|
||||||
|
|
||||||
|
@ -27,11 +27,8 @@ set -g mouse on
|
||||||
# allow truecolor support
|
# allow truecolor support
|
||||||
set -g default-terminal 'xterm-256color'
|
set -g default-terminal 'xterm-256color'
|
||||||
set -ga terminal-overrides ',xterm-256color:Tc'
|
set -ga terminal-overrides ',xterm-256color:Tc'
|
||||||
# Set Cursor terminal override, so nvim can change cursor style when changing modes
|
|
||||||
# more info see nvim, :help tui-cursor-shape
|
|
||||||
# LEGACY: this should not be necessary anymore
|
|
||||||
# set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
|
|
||||||
set -g status-keys vi
|
set -g status-keys vi
|
||||||
|
set-window-option -g mode-keys vi
|
||||||
set -g history-limit 10000
|
set -g history-limit 10000
|
||||||
|
|
||||||
# Screen size is based on the smallest client looking at the current windows, not the smallest
|
# Screen size is based on the smallest client looking at the current windows, not the smallest
|
||||||
|
@ -111,6 +108,12 @@ bind-key '-' split-window -v -c '#{pane_current_path}'
|
||||||
# Open a sessions chooser
|
# Open a sessions chooser
|
||||||
bind C-s split-window -v "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t"
|
bind C-s split-window -v "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t"
|
||||||
|
|
||||||
|
# Make visual selections act a little more like vim
|
||||||
|
bind-key -T copy-mode-vi v send -X begin-selection
|
||||||
|
bind-key -T copy-mode-vi V send -X select-line
|
||||||
|
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'wl-copy' \; send -X rectangle-off
|
||||||
|
bind-key -T copy-mode-vi 'C-v' send -X begin-selection \; send -X rectangle-on
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
## 4. THEME ##
|
## 4. THEME ##
|
||||||
#####################
|
#####################
|
||||||
|
|
Loading…
Reference in a new issue