1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-04-19 16:27:45 +02:00

Compare commits

...

4 Commits

Author SHA1 Message Date
bc84a42d22 nvim: added wilder.nvim 2023-08-10 05:20:24 +02:00
f7da9b553d nvim: git blame in statusbar added 2023-08-10 04:19:26 +02:00
39e4c0c40e nvim: removed unneeded not-lua plugins 2023-08-10 04:08:26 +02:00
9e9a73232d nvim: swapped async tex previewer 2023-08-10 03:48:56 +02:00
6 changed files with 103 additions and 72 deletions

View File

@ -72,6 +72,8 @@ 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')

View File

@ -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 %'
}) })

View File

@ -42,8 +42,13 @@ 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 })
-- open corresponding file (pdf/html/...,md) -- frabjous/knap
vim.api.nvim_set_keymap('n', '<leader>p', ':!opout <c-r>%<CR><CR>', { noremap = true }) vim.api.nvim_create_autocmd('FileType', {
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', {

View File

@ -16,7 +16,7 @@ return require("lazy").setup({
-- display git status per line -- display git status per line
{ {
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
config = {} opts = {}
}, },
-- show indentation lines -- show indentation lines
@ -31,20 +31,35 @@ return require("lazy").setup({
-- statusline -- statusline
{ {
'nvim-lualine/lualine.nvim', 'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons', }, dependencies = {
opts = { 'nvim-tree/nvim-web-devicons',
options = { {
symbols = { 'f-person/git-blame.nvim',
error = Error_sign, config = function()
warn = Warn_sign, vim.g.gitblame_display_virtual_text = 0
hint = Hint_sign, end
info = Info_sign
},
theme = 'tccs',
component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' }
} }
} },
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 = {
lualine_c = {
{ require('gitblame').get_current_blame_text, cond = require('gitblame').is_blame_text_available }
}
}
})
end
}, },
-- show function signature while typing -- show function signature while typing
@ -67,25 +82,10 @@ 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',
config = {} opts = {}
}, },
-- 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' },
config = {} opts = {}
}, },
-- clean up white spaces and empty lines before writing -- clean up white spaces and empty lines before writing
@ -389,35 +389,32 @@ 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",
config = {} opts = {}
}, },
-- commenting improvements -- commenting improvements
{ {
'numToStr/Comment.nvim', 'numToStr/Comment.nvim',
config = {} opts = {}
},
-- 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
@ -427,6 +424,48 @@ 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

View File

@ -1,14 +0,0 @@
#!/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

View File

@ -10,8 +10,7 @@ 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|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|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 ".*\\.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