home-config/nvim/config/init.vim

7cbc4ab3f8492a6fb16e0b80af413d044ae8fec4 · 2.1 KB · 77 lines raw

1 set nu rnu
2 imap kj <Esc>
3 set ts=4
4 set sw=4
5 set sts=4
6 set et
7 set mouse=
8
9 call plug#begin(stdpath('data') . '/plugged')
10 "Plug 'prabirshrestha/vim-lsp'
11 "Plug 'mattn/vim-lsp-settings'
12 "Plug 'prabirshrestha/asyncomplete.vim'
13 "Plug 'prabirshrestha/asyncomplete-lsp.vim'
14 "Plug 'Yggdroot/indentLine'
15 Plug 'nvim-treesitter/nvim-treesitter', {'do':':TSUpdate'}
16 Plug 'vim-pandoc/vim-pandoc'
17 Plug 'vim-pandoc/vim-pandoc-syntax'
18 Plug 'dhruvasagar/vim-table-mode'
19 Plug '~/.config/nvim/after'
20 Plug 'skywind3000/asyncrun.vim'
21 Plug 'folke/tokyonight.nvim', {'branch':'main'}
22 Plug 'nvim-lualine/lualine.nvim'
23 Plug 'nvim-tree/nvim-web-devicons'
24 Plug 'ms-jpq/coq_nvim', {'branch':'coq'}
25 Plug 'ms-jpq/coq.artifacts', {'branch':'artifacts'}
26 Plug 'nvim-orgmode/orgmode'
27 call plug#end()
28
29 "Load Theme
30 colorscheme tokyonight-night
31
32 "Load COQ Autocomplete
33 let g:coq_settings = {'auto_start':'shut-up'}
34
35 "Load LuaLine, COQ, and nvim-orgmode
36 lua << END
37 require('lualine').setup()
38 require('coq')
39 require('orgmode').setup_ts_grammar()
40 require('nvim-treesitter.configs').setup {
41 highlight = {
42 enable = true,
43 additional_vim_regex_highlighting = {'org'},
44 },
45 ensure_installed = {'org', 'vim'},
46 }
47
48 require('orgmode').setup({
49 org_agenda_files = {'~/Sync/org/**/*'},
50 org_default_notes_file = '~/Sync/org/refile.org',
51 })
52
53 vim.opt.conceallevel = 2
54 vim.opt.concealcursor = nc
55
56 --local lspconfig = require('lspconfig')
57 END
58
59 "asynccomplete Auto Complete Config
60 "inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
61 "inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
62 "inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
63
64 "vim-pandoc config
65 let g:pandoc#modules#disabled = ['spell', 'folding']
66
67 "vim-table-mode config
68 let g:table_mode_corner_corner='+'
69 let g:table_mode_header_fillchar='='
70
71 "pandoc render and open preview
72 command Pv AsyncRun zathura '%:r.pdf'
73 command Rd silent exec "!pandoc -t pdf -o %:r.pdf --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
74 command Rr exec "!pandoc -t pdf -o %:r.pdf --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
75
76 "Auto-rerender markdown files to pdf
77 autocmd BufWritePost *.mkd :Rd