home-config/nvim/config/init.vim

77dbb818209f59e40a353302d76975e9bd654e55 · 2.4 KB · 91 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("mason").setup()
47 require("mason-lspconfig").setup {
48 ensure_installed = { "pyright" },
49 }
50
51 require('leap').add_default_mappings()
52
53 require("mason-lspconfig").setup_handlers {
54 function (server_name)
55 require("lspconfig")[server_name].setup {}
56 end,
57 }
58
59 require('nvim-treesitter.configs').setup {
60 highlight = {
61 enable = true,
62 additional_vim_regex_highlighting = {'org'},
63 },
64 ensure_installed = {'vim', 'python'},
65 }
66
67 vim.opt.conceallevel = 2
68 vim.opt.concealcursor = nc
69
70 --local lspconfig = require('lspconfig')
71 END
72
73 "asynccomplete Auto Complete Config
74 "inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
75 "inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
76 "inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
77
78 "vim-pandoc config
79 let g:pandoc#modules#disabled = ['spell', 'folding']
80
81 "vim-table-mode config
82 let g:table_mode_corner_corner='+'
83 let g:table_mode_header_fillchar='='
84
85 "pandoc render and open preview
86 command Pv AsyncRun zathura '%:r.pdf'
87 command Rd silent exec "!pandoc -t pdf -o %:r.pdf --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
88 command Rr exec "!pandoc -t pdf -o %:r.pdf --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
89
90 "Auto-rerender markdown files to pdf
91 autocmd BufWritePost *.mkd :Rd