mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-04-20 00:37:44 +02:00
Compare commits
No commits in common. "bc84a42d22c45856c29291c434772336ef2e1e7e" and "6a685bae7a74a42bc3a0be1be8e6a95654a863b0" have entirely different histories.
bc84a42d22
...
6a685bae7a
@ -72,8 +72,6 @@ vim.o.foldlevelstart = 99
|
|||||||
vim.o.foldenable = true
|
vim.o.foldenable = true
|
||||||
vim.o.conceallevel = 0
|
vim.o.conceallevel = 0
|
||||||
|
|
||||||
vim.g.markdown_folding = 1
|
|
||||||
|
|
||||||
-- load general mapped keys
|
-- load general mapped keys
|
||||||
require('style')
|
require('style')
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ vim.filetype.add({
|
|||||||
|
|
||||||
vim.api.nvim_create_autocmd({ 'VimLeave' },
|
vim.api.nvim_create_autocmd({ 'VimLeave' },
|
||||||
{
|
{
|
||||||
pattern = { '*.c' },
|
pattern = { 'c' },
|
||||||
command = '!cclear'
|
command = '!cclear'
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|||||||
|
|
||||||
vim.api.nvim_create_autocmd({ 'VimLeave' },
|
vim.api.nvim_create_autocmd({ 'VimLeave' },
|
||||||
{
|
{
|
||||||
pattern = { '*.tex' },
|
pattern = { 'tex' },
|
||||||
command = '!texclear %'
|
command = '!texclear %'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -42,13 +42,8 @@ vim.api.nvim_set_keymap('n', '<leader>ss', ':%s//gI<Left><Left><Left>', { norema
|
|||||||
vim.api.nvim_set_keymap('n', '<leader>is', ':.w >> in<cr>dd', { noremap = true })
|
vim.api.nvim_set_keymap('n', '<leader>is', ':.w >> in<cr>dd', { noremap = true })
|
||||||
|
|
||||||
|
|
||||||
-- frabjous/knap
|
-- open corresponding file (pdf/html/...,md)
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.api.nvim_set_keymap('n', '<leader>p', ':!opout <c-r>%<CR><CR>', { noremap = true })
|
||||||
pattern = 'tex',
|
|
||||||
callback = function()
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>p', ':lua require("knap").toggle_autopreviewing()<CR>', { noremap = true })
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- iamcco/markdown-preview.nvim
|
-- iamcco/markdown-preview.nvim
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
@ -16,7 +16,7 @@ return require("lazy").setup({
|
|||||||
-- display git status per line
|
-- display git status per line
|
||||||
{
|
{
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
opts = {}
|
config = {}
|
||||||
},
|
},
|
||||||
|
|
||||||
-- show indentation lines
|
-- show indentation lines
|
||||||
@ -31,35 +31,20 @@ return require("lazy").setup({
|
|||||||
-- statusline
|
-- statusline
|
||||||
{
|
{
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
dependencies = {
|
dependencies = { 'nvim-tree/nvim-web-devicons', },
|
||||||
'nvim-tree/nvim-web-devicons',
|
opts = {
|
||||||
{
|
options = {
|
||||||
'f-person/git-blame.nvim',
|
symbols = {
|
||||||
config = function()
|
error = Error_sign,
|
||||||
vim.g.gitblame_display_virtual_text = 0
|
warn = Warn_sign,
|
||||||
end
|
hint = Hint_sign,
|
||||||
}
|
info = Info_sign
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require('lualine').setup({
|
|
||||||
options = {
|
|
||||||
symbols = {
|
|
||||||
error = Error_sign,
|
|
||||||
warn = Warn_sign,
|
|
||||||
hint = Hint_sign,
|
|
||||||
info = Info_sign
|
|
||||||
},
|
|
||||||
theme = 'tccs',
|
|
||||||
component_separators = { left = '', right = '' },
|
|
||||||
section_separators = { left = '', right = '' }
|
|
||||||
},
|
},
|
||||||
sections = {
|
theme = 'tccs',
|
||||||
lualine_c = {
|
component_separators = { left = '', right = '' },
|
||||||
{ require('gitblame').get_current_blame_text, cond = require('gitblame').is_blame_text_available }
|
section_separators = { left = '', right = '' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
end
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- show function signature while typing
|
-- show function signature while typing
|
||||||
@ -82,10 +67,25 @@ return require("lazy").setup({
|
|||||||
build = "cd app && yarn install"
|
build = "cd app && yarn install"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- latex asynchronous pdf rendering
|
||||||
|
{
|
||||||
|
'donRaphaco/neotex',
|
||||||
|
ft = { 'tex' },
|
||||||
|
config = function()
|
||||||
|
vim.g.neotex_enabled = 2
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
-- nim language support
|
||||||
|
{
|
||||||
|
'zah/nim.vim',
|
||||||
|
ft = { 'nim' }
|
||||||
|
},
|
||||||
|
|
||||||
-- automatic closing of brackets
|
-- automatic closing of brackets
|
||||||
{
|
{
|
||||||
'windwp/nvim-autopairs',
|
'windwp/nvim-autopairs',
|
||||||
opts = {}
|
config = {}
|
||||||
},
|
},
|
||||||
|
|
||||||
-- lang server installations
|
-- lang server installations
|
||||||
@ -360,7 +360,7 @@ return require("lazy").setup({
|
|||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
version = '0.1.2',
|
version = '0.1.2',
|
||||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
opts = {}
|
config = {}
|
||||||
},
|
},
|
||||||
|
|
||||||
-- clean up white spaces and empty lines before writing
|
-- clean up white spaces and empty lines before writing
|
||||||
@ -389,32 +389,35 @@ return require("lazy").setup({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- git wrapper
|
||||||
|
{
|
||||||
|
'tpope/vim-fugitive',
|
||||||
|
},
|
||||||
|
|
||||||
|
-- markdown language support
|
||||||
|
{
|
||||||
|
'preservim/vim-markdown',
|
||||||
|
ft = { 'markdown' },
|
||||||
|
config = function()
|
||||||
|
vim.g.vim_markdown_folding_style_pythonic = 1
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
-- bulk renamer
|
||||||
|
{
|
||||||
|
'qpkorr/vim-renamer',
|
||||||
|
},
|
||||||
|
|
||||||
-- additional quote/parantheses funtions
|
-- additional quote/parantheses funtions
|
||||||
{
|
{
|
||||||
"kylechui/nvim-surround",
|
"kylechui/nvim-surround",
|
||||||
opts = {}
|
config = {}
|
||||||
},
|
},
|
||||||
|
|
||||||
-- commenting improvements
|
-- commenting improvements
|
||||||
{
|
{
|
||||||
'numToStr/Comment.nvim',
|
'numToStr/Comment.nvim',
|
||||||
opts = {}
|
config = {}
|
||||||
},
|
|
||||||
|
|
||||||
-- latex asynchronous pdf rendering
|
|
||||||
{
|
|
||||||
'frabjous/knap',
|
|
||||||
ft = { 'tex' },
|
|
||||||
config = function()
|
|
||||||
vim.g.knap_settings = {
|
|
||||||
texoutputext = "pdf",
|
|
||||||
textopdf = "pdflatex -synctex=1 -halt-on-error -interaction=batchmode %docroot%",
|
|
||||||
textopdfviewerlaunch =
|
|
||||||
"zathura --synctex-editor-command 'nvim --headless -es --cmd \"lua require('\"'\"'knaphelper'\"'\"').relayjump('\"'\"'%servername%'\"'\"','\"'\"'%{input}'\"'\"',%{line},0)\"' %outputfile%",
|
|
||||||
textopdfviewerrefresh = "none",
|
|
||||||
textopdfforwardjump = "zathura --synctex-forward=%line%:%column%:%srcfile% %outputfile%"
|
|
||||||
}
|
|
||||||
end
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- colorscheme
|
-- colorscheme
|
||||||
@ -424,48 +427,6 @@ return require("lazy").setup({
|
|||||||
vim.cmd('colorscheme tccs')
|
vim.cmd('colorscheme tccs')
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
||||||
-- improved wild menu
|
|
||||||
{
|
|
||||||
'gelguy/wilder.nvim',
|
|
||||||
dependencies = {
|
|
||||||
'roxma/nvim-yarp',
|
|
||||||
'roxma/vim-hug-neovim-rpc',
|
|
||||||
'romgrk/fzy-lua-native'
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local wilder = require('wilder')
|
|
||||||
wilder.setup({
|
|
||||||
modes = { ':', '/', '?' },
|
|
||||||
accept_key = '<CR>',
|
|
||||||
reject_key = '<C-e>'
|
|
||||||
})
|
|
||||||
wilder.set_option('renderer', wilder.popupmenu_renderer({
|
|
||||||
highlighter = wilder.basic_highlighter(),
|
|
||||||
left = { ' ', wilder.popupmenu_devicons() },
|
|
||||||
right = { ' ', wilder.popupmenu_scrollbar() },
|
|
||||||
}))
|
|
||||||
wilder.set_option('pipeline', {
|
|
||||||
wilder.branch(
|
|
||||||
wilder.python_file_finder_pipeline({
|
|
||||||
file_command = { 'find', '.', '-type', 'f', '-printf', '%P\n' },
|
|
||||||
dir_command = { 'find', '.', '-type', 'd', '-printf', '%P\n' },
|
|
||||||
filters = { 'fuzzy_filter', 'difflib_sorter' },
|
|
||||||
}),
|
|
||||||
wilder.cmdline_pipeline({
|
|
||||||
language = 'python',
|
|
||||||
fuzzy = 2,
|
|
||||||
}),
|
|
||||||
wilder.python_search_pipeline({
|
|
||||||
pattern = wilder.python_fuzzy_pattern(),
|
|
||||||
sorter = wilder.python_difflib_sorter(),
|
|
||||||
engine = 're',
|
|
||||||
})
|
|
||||||
),
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- lazy.nvim configuration
|
-- lazy.nvim configuration
|
||||||
|
14
.local/bin/tools/nvim/opout
Executable file
14
.local/bin/tools/nvim/opout
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# opout: "open output": A general handler for opening a file's intended output,
|
||||||
|
# usually the pdf of a compiled document. I find this useful especially
|
||||||
|
# running from vim.
|
||||||
|
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||||
|
|
||||||
|
basename="$(echo "$1" | sed 's/\.[^\/.]*$//')"
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
*.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid xdg-open "$basename".pdf >/dev/null 2>&1 & ;;
|
||||||
|
*.html) setsid "$BROWSER" "$basename".html >/dev/null 2>&1 & ;;
|
||||||
|
*.sent) setsid sent "$1" >/dev/null 2>&1 & ;;
|
||||||
|
esac
|
@ -10,7 +10,8 @@ case "$1" in
|
|||||||
dir=$(dirname "$file")
|
dir=$(dirname "$file")
|
||||||
base="${file%.*}"
|
base="${file%.*}"
|
||||||
if [ -f "$dir/indent.log" ]; then rm "$dir/indent.log"; fi
|
if [ -f "$dir/indent.log" ]; then rm "$dir/indent.log"; fi
|
||||||
find "$dir" -maxdepth 1 -type f -regextype gnu-awk -regex "^$base\\.(4tc|xref|tmp|pyc|pyo|fls|vrb|fdb_latexmk|bak|swp|log|synctex\\(busy\\)|lof|lot|maf|idx|mtc|mtc0|nav|out|snm|toc|loa|bcf|run\\.xml|synctex\\.gz|blg|bbl|glg|glo|gls|glsdefs|ilg|ist|acn|acr|alg|toc)" -delete ;
|
find "$dir" -maxdepth 1 -type f -regextype gnu-awk -regex "^$base\\.(4tc|xref|tmp|pyc|pyo|fls|vrb|fdb_latexmk|bak|swp|log|synctex\\(busy\\)|lof|lot|maf|idx|mtc|mtc0|nav|out|snm|toc|bcf|run\\.xml|synctex\\.gz|blg|bbl|glg|glo|gls|glsdefs|ilg|ist|acn|acr|alg|toc)" -delete ;
|
||||||
find "$dir" -maxdepth 1 -type f -regextype gnu-awk -regex ".*\\.aux" -delete ;;
|
find "$dir" -maxdepth 1 -type f -regextype gnu-awk -regex ".*\\.aux" -delete ;;
|
||||||
*) printf "Give .tex file as argument.\\n" ;;
|
*) printf "Give .tex file as argument.\\n" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user