home-config/nvim/config/init.vim

8452174a586fae2172a7b6aede484185899b58b1 · 2.6 KB · 97 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 set cursorline
9 set cc=79
10
11 call plug#begin(stdpath('data') . '/plugged')
12 "Plug 'prabirshrestha/vim-lsp'
13 "Plug 'mattn/vim-lsp-settings'
14 "Plug 'prabirshrestha/asyncomplete.vim'
15 "Plug 'prabirshrestha/asyncomplete-lsp.vim'
16 "Plug 'Yggdroot/indentLine'
17 Plug 'nvim-treesitter/nvim-treesitter', {'do':':TSUpdate'}
18 Plug 'vim-pandoc/vim-pandoc'
19 Plug 'vim-pandoc/vim-pandoc-syntax'
20 Plug 'dhruvasagar/vim-table-mode'
21 Plug '~/.config/nvim/after'
22 Plug 'skywind3000/asyncrun.vim'
23 Plug 'folke/tokyonight.nvim', {'branch':'main'}
24 Plug 'nvim-lualine/lualine.nvim'
25 Plug 'nvim-tree/nvim-web-devicons'
26 Plug 'ms-jpq/coq_nvim', {'branch':'coq'}
27 Plug 'ms-jpq/coq.artifacts', {'branch':'artifacts'}
28 Plug 'williamboman/mason.nvim'
29 Plug 'williamboman/mason-lspconfig.nvim'
30 Plug 'neovim/nvim-lspconfig'
31 Plug 'nvim-orgmode/orgmode'
32 call plug#end()
33
34 "Load Theme
35 colorscheme tokyonight-night
36
37 "Load COQ Autocomplete
38 let g:coq_settings = {'auto_start':'shut-up'}
39
40 "Load LuaLine, COQ, and nvim-orgmode
41 lua << END
42 require('lualine').setup()
43 require('coq')
44 require('orgmode').setup_ts_grammar()
45 require("mason").setup()
46 require("mason-lspconfig").setup {
47 ensure_installed = { "pyright" },
48 }
49
50 require("mason-lspconfig").setup_handlers {
51 function (server_name)
52 require("lspconfig")[server_name].setup {}
53 end,
54 }
55
56 require('nvim-treesitter.configs').setup {
57 highlight = {
58 enable = true,
59 additional_vim_regex_highlighting = {'org'},
60 },
61 ensure_installed = {'org', 'vim', 'python'},
62 }
63
64 require('orgmode').setup({
65 org_agenda_files = {'~/Sync/org/**/*'},
66 org_default_notes_file = '~/Sync/org/refile.org',
67 org_blank_before_new_entry = {
68 heading = false,
69 plain_list_item = false,
70 },
71 })
72
73 vim.opt.conceallevel = 2
74 vim.opt.concealcursor = nc
75
76 --local lspconfig = require('lspconfig')
77 END
78
79 "asynccomplete Auto Complete Config
80 "inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
81 "inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
82 "inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
83
84 "vim-pandoc config
85 let g:pandoc#modules#disabled = ['spell', 'folding']
86
87 "vim-table-mode config
88 let g:table_mode_corner_corner='+'
89 let g:table_mode_header_fillchar='='
90
91 "pandoc render and open preview
92 command Pv AsyncRun zathura '%:r.pdf'
93 command Rd silent exec "!pandoc -t pdf -o %:r.pdf --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
94 command Rr exec "!pandoc -t pdf -o %:r.pdf --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
95
96 "Auto-rerender markdown files to pdf
97 autocmd BufWritePost *.mkd :Rd