This commit is contained in:
Yannick Reiß 2023-12-09 11:49:45 +01:00
parent 0110d8d801
commit cd10f76030
No known key found for this signature in database
GPG Key ID: 5A3AF456F0A0338C
5 changed files with 33 additions and 8 deletions

View File

@ -22,12 +22,12 @@
"nerdtree-git-plugin": { "branch": "master", "commit": "e1fe727127a813095854a5b063c15e955a77eafb" }, "nerdtree-git-plugin": { "branch": "master", "commit": "e1fe727127a813095854a5b063c15e955a77eafb" },
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
"nvim-cmp-lua-latex-symbols": { "branch": "master", "commit": "89345d6e333c700d13748e8a7ee6fe57279b7f88" }, "nvim-cmp-lua-latex-symbols": { "branch": "master", "commit": "89345d6e333c700d13748e8a7ee6fe57279b7f88" },
"nvim-dap": { "branch": "master", "commit": "d7749eb3d9933a75d2244820308ce442f646c7ae" }, "nvim-dap": { "branch": "master", "commit": "bbe2c6f3438542a37cc2141a8e385f7dfe07d87d" },
"nvim-doxyscan": { "branch": "master", "commit": "2c266fdb9395d6afa5d7188f8212fd7757193990" }, "nvim-doxyscan": { "branch": "master", "commit": "2c266fdb9395d6afa5d7188f8212fd7757193990" },
"nvim-lspconfig": { "branch": "master", "commit": "511609ae0311abfcfaed3c398429a147e895ce2c" }, "nvim-lspconfig": { "branch": "master", "commit": "511609ae0311abfcfaed3c398429a147e895ce2c" },
"nvim-treesitter": { "branch": "master", "commit": "180e1ca385442e35e1d18420221a148c5e045671" }, "nvim-treesitter": { "branch": "master", "commit": "bd5517989398145c36d859927fb4e76a45c66cf6" },
"nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" },
"nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" }, "nvim-web-devicons": { "branch": "master", "commit": "8b2e5ef9eb8a717221bd96cb8422686d65a09ed5" },
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
"telescope-ultisnips.nvim": { "branch": "main", "commit": "f48b6d4f53b31507d3fd514905c6940409e8ada8" }, "telescope-ultisnips.nvim": { "branch": "main", "commit": "f48b6d4f53b31507d3fd514905c6940409e8ada8" },
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },

23
lua/markdownpreview.lua Normal file
View File

@ -0,0 +1,23 @@
-- default config:
require("peek").setup({
auto_load = true, -- whether to automatically load preview when
-- entering another markdown buffer
close_on_bdelete = true, -- close preview window on buffer delete
syntax = true, -- enable syntax highlighting, affects performance
theme = "dark", -- 'dark' or 'light'
update_on_change = true,
app = "webview", -- 'webview', 'browser', string or a table of strings
-- explained below
filetype = { "markdown" }, -- list of filetypes to recognize as markdown
-- relevant if update_on_change is true
throttle_at = 200000, -- start throttling when file exceeds this
-- amount of bytes in size
throttle_time = "auto", -- minimum amount of time in milliseconds
-- that has to pass before starting new render
})

View File

@ -127,3 +127,4 @@ intel
Calma's Calma's
nsf nsf
Vec Vec
jedec

Binary file not shown.

View File

@ -22,7 +22,7 @@ function! Build()
let l:filetype = &filetype let l:filetype = &filetype
if l:filetype == 'c' || l:filetype == 'cpp' || l:filetype == 'h' || l:filetype == 'hpp' if l:filetype == 'c' || l:filetype == 'cpp' || l:filetype == 'h' || l:filetype == 'hpp'
execute 'make' execute '!make'
elseif l:filetype == 'py' || l:filetype == 'python' elseif l:filetype == 'py' || l:filetype == 'python'
execute '!python3 %' execute '!python3 %'
elseif l:filetype == 'tex' elseif l:filetype == 'tex'
@ -30,11 +30,13 @@ function! Build()
elseif l:filetype == 'rs' elseif l:filetype == 'rs'
execute 'cargo run' execute 'cargo run'
elseif l:filetype == 'S' elseif l:filetype == 'S'
execute 'make' execute '!make'
elseif l:filetype == 'verilog' elseif l:filetype == 'verilog'
execute 'verilator --binary %' execute '!verilator --binary %'
elseif l:filetype == 'rust' elseif l:filetype == 'rust'
execute 'cargo run' execute '!cargo run'
elseif l:filetype == 'markdown'
execute '!okular %&'
else else
echo "Unsupported file type: " . l:filetype echo "Unsupported file type: " . l:filetype
endif endif
@ -43,4 +45,3 @@ endfunction
nnoremap <C-b> :call Build()<CR> nnoremap <C-b> :call Build()<CR>
nnoremap <M-w> :bdelete<CR> nnoremap <M-w> :bdelete<CR>
nnoremap <C-y> :b#<CR> nnoremap <C-y> :b#<CR>