nvim: migrate from glow to peek for render markdown
This commit is contained in:
parent
dc9200e7c9
commit
38c31c4724
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@ home/user/.subzsh/plugins/*
|
||||
!home/user/.subzsh/plugins/dirhistory.zsh
|
||||
|
||||
home/user/.config/nvim/plugin
|
||||
home/user/.config/nvim/spell
|
||||
|
||||
home/user/.subbash/bashrc.d/*
|
||||
!home/user/.subbash/bashrc.d/00_test.sh
|
||||
|
||||
@ -224,3 +224,6 @@ workspace $ws2 output primary
|
||||
workspace $ws9 output $SecMon
|
||||
workspace $ws10 output $SecMon
|
||||
exec --no-startup-id i3-msg 'workspace $ws1; exec firefox'
|
||||
|
||||
|
||||
no_focus [title="^Peek preview$"]
|
||||
|
||||
@ -43,7 +43,7 @@ local plugins = {
|
||||
end
|
||||
},
|
||||
{
|
||||
'EdenEast/nightfox.nvim'
|
||||
'EdenEast/nightfox.nvim' -- colorscheme
|
||||
},
|
||||
{
|
||||
'ellisonleao/gruvbox.nvim' -- colorscheme
|
||||
@ -96,14 +96,6 @@ local plugins = {
|
||||
{
|
||||
'windwp/nvim-ts-autotag'
|
||||
},
|
||||
{
|
||||
'lervag/vimtex'
|
||||
},
|
||||
{
|
||||
'shime/vim-livedown',
|
||||
enabled = vim.fn.executable "npm" == 1,
|
||||
build = '/usr/bin/npm install -g livedown'
|
||||
},
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate'
|
||||
@ -201,6 +193,7 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
'folke/neodev.nvim',
|
||||
ft = {'lua'},
|
||||
dependencies = {
|
||||
'neovim/nvim-lspconfig'
|
||||
},
|
||||
@ -208,6 +201,26 @@ local plugins = {
|
||||
require('neodev').setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
'toppair/peek.nvim',
|
||||
enabled = vim.fn.executable "deno" == 1,
|
||||
ft = {'markdown'},
|
||||
build = 'deno task --quiet build:fast',
|
||||
config = function()
|
||||
require('peek').setup({
|
||||
auto_load = true,
|
||||
close_on_bdelete = true,
|
||||
syntax = true,
|
||||
theme = 'dark',
|
||||
update_on_change = true,
|
||||
app = 'webview',
|
||||
filetype = {'markdown'},
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ '<Leader>rr', "<cmd>lua require('peek').open()<CR>" },
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
require("lazy").setup(
|
||||
|
||||
@ -75,7 +75,6 @@ end
|
||||
autocmd_run_script_by_filetype('python', 'python3')
|
||||
autocmd_run_script_by_filetype('go', 'go run')
|
||||
autocmd_run_script_by_filetype('rust', 'cargo run')
|
||||
autocmd_run_script_by_filetype('markdown', 'glow')
|
||||
|
||||
autocmd_run_tests_by_filetype('python', 'pytest')
|
||||
|
||||
|
||||
@ -12,12 +12,16 @@ test -d "$LAYOUTS_DIR" || (mkdir "$LAYOUTS_DIR" && touch "$LAYOUTS_DIR/default.s
|
||||
|
||||
|
||||
die_if_invalid_path() {
|
||||
if [[ -z "$1" ]]; then
|
||||
_die "Blank name"
|
||||
fi
|
||||
|
||||
if [[ "$1" =~ ".." ]]; then
|
||||
die "Path can\`t contains '..'" 3
|
||||
_die "Path can\`t contains '..'" 3
|
||||
fi
|
||||
|
||||
if [[ "$1" = /* ]]; then
|
||||
die "Path can\`t start from '/'" 3
|
||||
_die "Path can\`t start from '/'" 3
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user