syntax match roffmac /^\..*$/ source ~/.config/nvim/latex.vim source ~/.config/nvim/roff.vim " global options set number set relativenumber set nohlsearch set incsearch set showcmd set scrolloff=10 set nowrap " custom keys let mapleader = "\" nnoremap m :make nnoremap l $ nnoremap h ^ nnoremap j 10j nnoremap k 10k nnoremap zz :wqa nnoremap m :make nnoremap y "+y nnoremap d "+d nnoremap p "+p nnoremap t :tab term nnoremap n :tabNext nnoremap c zz tnoremap " language specific settings autocmd FileType tex call Latexsetup() " latex autocmd FileType nroff call Roffsetup() " roff " plugins call plug#begin('~/.local/share/nvim/plugged') Plug 'neovim/nvim-lspconfig' Plug 'hrsh7th/cmp-nvim-lsp' Plug 'hrsh7th/cmp-buffer' Plug 'hrsh7th/cmp-path' Plug 'hrsh7th/cmp-cmdline' Plug 'hrsh7th/nvim-cmp' Plug 'hrsh7th/cmp-nvim-lsp' Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'kepano/flexoki-neovim' call plug#end() colorscheme flexoki-dark " lsp client things lua << EOF local capabilities = require("cmp_nvim_lsp").default_capabilities() local lspconfig = require('lspconfig') -- Enable some language servers with the additional completion capabilities offered by nvim-cmp local servers = { 'clangd', 'hls', 'texlab' } for _, lsp in ipairs(servers) do lspconfig[lsp].setup { capabilities = capabilities, } end -- nvim-cmp setup local cmp = require 'cmp' cmp.setup { mapping = cmp.mapping.preset.insert({ [''] = cmp.mapping.scroll_docs(-4), -- Up [''] = cmp.mapping.scroll_docs(4), -- Down -- C-b (back) C-f (forward) for snippet placeholder navigation. [''] = cmp.mapping.complete(), [''] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = true, }, [''] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() else fallback() end end, { 'i', 's' }), [''] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() else fallback() end end, { 'i', 's' }), }), sources = { { name = 'nvim_lsp' }, }, }