home-config/nvim/config/init.vim

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