home-config/nvim/config/init.vim

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