home-config/nvim/config/init.vim

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