home-config/nvim/config/init.vim

be3902a72477823bd5dc70301f4e48c84bc4d526 · 2.4 KB · 85 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 'https://codeberg.org/andyg/leap.nvim'
32 Plug 'xiyaowong/transparent.nvim'
33 Plug 'chentoast/marks.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("mason").setup()
48 require("mason-lspconfig").setup {
49 ensure_installed = { "pyright" },
50 }
51
52 -- Leap keybinds
53 config = function(_, opts)
54 vim.keymap.set({'n', 'x', 'o'}, 's', '<Plug>(leap-forward)')
55 vim.keymap.set({'n', 'x', 'o'}, 'S', '<Plug>(leap-backward)')
56 vim.keymap.set({'n', 'x', 'o'}, 'gs', '<Plug>(leap-from-window)')
57 end
58
59 require'nvim-treesitter'.install { 'zig','go','python','vim' }
60
61 vim.opt.conceallevel = 2
62 vim.opt.concealcursor = nc
63
64 --local lspconfig = require('lspconfig')
65 END
66
67 "asynccomplete Auto Complete Config
68 "inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
69 "inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
70 "inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
71
72 "vim-pandoc config
73 let g:pandoc#modules#disabled = ['spell', 'folding']
74
75 "vim-table-mode config
76 let g:table_mode_corner_corner='+'
77 let g:table_mode_header_fillchar='='
78
79 "pandoc render and open preview
80 command Pv AsyncRun zathura '%:r.pdf'
81 command Rd silent exec "!pandoc -t pdf -o %:r.pdf --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
82 command Rr exec "!pandoc -t pdf -o %:r.pdf --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
83
84 "Auto-rerender markdown files to pdf
85 autocmd BufWritePost *.mkd :Rd