home-config/nvim/config/init.vim

eafe6ee01108cbe0f5ddd17f03f5c5128a158967 · 2.3 KB · 83 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 'williamboman/mason.nvim'
27 Plug 'nvim-orgmode/orgmode'
28 call plug#end()
29
30 "Load Theme
31 colorscheme tokyonight-night
32
33 "Load COQ Autocomplete
34 let g:coq_settings = {'auto_start':'shut-up'}
35
36 "Load LuaLine, COQ, and nvim-orgmode
37 lua << END
38 require('lualine').setup()
39 require('coq')
40 require('orgmode').setup_ts_grammar()
41 require("mason").setup()
42 require('nvim-treesitter.configs').setup {
43 highlight = {
44 enable = true,
45 additional_vim_regex_highlighting = {'org'},
46 },
47 ensure_installed = {'org', 'vim'},
48 }
49
50 require('orgmode').setup({
51 org_agenda_files = {'~/Sync/org/**/*'},
52 org_default_notes_file = '~/Sync/org/refile.org',
53 org_blank_before_new_entry = {
54 heading = false,
55 plain_list_item = false,
56 },
57 })
58
59 vim.opt.conceallevel = 2
60 vim.opt.concealcursor = nc
61
62 --local lspconfig = require('lspconfig')
63 END
64
65 "asynccomplete Auto Complete Config
66 "inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
67 "inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
68 "inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
69
70 "vim-pandoc config
71 let g:pandoc#modules#disabled = ['spell', 'folding']
72
73 "vim-table-mode config
74 let g:table_mode_corner_corner='+'
75 let g:table_mode_header_fillchar='='
76
77 "pandoc render and open preview
78 command Pv AsyncRun zathura '%:r.pdf'
79 command Rd silent exec "!pandoc -t pdf -o %:r.pdf --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
80 command Rr exec "!pandoc -t pdf -o %:r.pdf --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
81
82 "Auto-rerender markdown files to pdf
83 autocmd BufWritePost *.mkd :Rd