PS5PXTHFTQDM4WVNMXEJUPLQVGQWULYJ5IVAXZ7LJX4ZUSICUKDAC
UMI55KGWNXUVGQ4YXEIF5L5M2QMYLZNUZGPQPF5C64RIULZK7TXAC
4LSO4STLQJZ7TXVI3BYUXAG7UV3LAICU65B52RUKABD3KHQ2G7GAC
K5EUTRJG3IQJGSDDG3WVBYKQOOR5MIXHQG3JDSQXDEBAQLSGV7EQC
H36KBOUUJVXFDBPX2FDVUMZNBDSHHTZU6EOPNNDHMUREGIXZXNEAC
XCR34YPGC3GY7CKQTQX4WUEKLRLAZKNSUPWOKGD5HUHK2RN7RKGAC
H4OOXBFAXCDFVBOEDE4HOO4NU5IDRAVFLTTHRNCX3APU4SPMMA5QC
KIYATYOLHDMF6YCCP4SXKCJ5YXIJQFXZJD7OAZA37WAU6YGGMM3AC
QWJ5FBQ7ZL75GTXLYEVPTLK7AEMBMBEYE7536WFLGINTG332LAIAC
ULKBUZEBFCZOZ5BTUW6262LG5DK6BUOVN6STTKCFLZFG3EE6PFPAC
UNMO22GQRCYHMIXPFTZTQVVPCOFSBVU2YV5CKLO72ZRDZ2AJ46WQC
AD3GGMJYYDKYXMTBCQK7IHKTVSM75XFTBHZSMFXFAQYWSPRHSCBAC
JTTWOADMNTGEUL5TBJSC5PEXSW6GMBZLY6TWLN2DHV26REVMZOZAC
5U2BEZGMRUSG3OQM3VGNF3XINPCKRLGU7CJJDUVRHHORN3IED2HQC
HWLVSY6UL5VDMK7NLQB2LJYEHV6KNKP4QIUWJKYTKKYW3L5ZLQBAC
6HKEOUTCAMUWZBFKHKSTWI2QMWQPTF6ZP5LLHHDO6PKXB5H7CSNQC
" show existing tab with 2 spaces width
setlocal tabstop=2
" when indenting with '>', use 2 spaces width
setlocal shiftwidth=2
" Tab configuration
setlocal tabstop=2 softtabstop=0 expandtab shiftwidth=2 smarttab
" show existing tab with 2 spaces width
setlocal tabstop=2
" when indenting with '>', use 2 spaces width
" also sets the number of spaces to be inserted b/c softtabstop=-1
setlocal shiftwidth=2
" use LSP whenever possible, but keep the default as ctags
" there seems to be some stability issues when trying the finder using nvim_lsp
" on a file that doesn't have a language server
let g:vista_executive_for = {
\ 'rust': 'nvim_lsp',
\ 'go': 'nvim_lsp',
\ 'python': 'nvim_lsp',
\ 'cpp': 'nvim_lsp',
\ 'c': 'nvim_lsp',
\ 'typescript': 'nvim_lsp',
\ 'javascript': 'nvim_lsp'
\ }
" disable the cursor blink that occurs when jumping to a symbol w/ vista
let g:vista_blink = [0, 0]
" the vista coloration is really erratic for some reason
let g:vista_keep_fzf_colors = 1
" there are already markers for the symbol types
let g:vista#renderer#enable_icon = 0
let g:vista_fzf_preview = ['right:40%']
" filetype detection for arm assembly files to enable syntax highlighting
au BufNewFile,BufRead *_armv8.s,*_armv8.S set filetype=arm
" filetype detection for verilog
au BufNewFile,BufRead *.v set filetype=verilog
" tab-triggered completion in insert mode
" inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
" inoremap <expr><s-tab> pumvisible() ? "\<c-p>" : "\<s-tab>"
:lua <<EOF
local nvim_lsp = require'nvim_lsp'
local capabilities = {
textDocument = {
completion = {
completionItem = {
snippetSupport = false
" Enable type inlay hints
autocmd CursorMoved,InsertLeave,BufEnter,BufWinEnter,TabEnter,BufWritePost *
\ lua require'lsp_extensions'.inlay_hints{prefix = '', highlight = "NonText"}
" set up the lsp settings for each language upon entering a buffer
:lua << EOF
local lspconfig = require('lspconfig')
-- local lsp_status = require('lsp-status')
-- -- lsp_status.register_progress()
local buf_set_keymap = vim.api.nvim_buf_set_keymap
-- -- -- local capabilities = lsp_status.capabilities
-- -- -- capabilities.textDocument.completion.completionItem.snippetSupport = false
local capabilities = {
textDocument = {
completion = {
completionItem = {
snippetSupport = false
}
}
local on_attach = function(client, bufnr)
require('completion').on_attach(client)
-- require('lsp_extensions').inlay_hints{prefix = '', highlight = 'NonText'}
-- lsp_status.on_attach(client, bufnr)
local opts = { noremap=true, silent=true }
-- there are several goto def/impl/decl actions. this first one is my favorite
buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
buf_set_keymap(bufnr, 'n', '<c-]>', '<cmd>lua vim.lsp.buf.definition()<cr>', opts) -- the traditional mapping
buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
buf_set_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
buf_set_keymap(bufnr, 'n', '<c-k>', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
buf_set_keymap(bufnr, 'n', '1gD', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
buf_set_keymap(bufnr, 'n', 'g0', '<cmd>lua vim.lsp.buf.document_symbol()<cr>', opts)
buf_set_keymap(bufnr, 'n', 'gW', '<cmd>lua vim.lsp.buf.workspace_symbol()<cr>', opts)
buf_set_keymap(bufnr, 'n', '<localleader>r', '<cmd>lua vim.lsp.buf.rename()<cr>', opts)
buf_set_keymap(bufnr, 'n', '<localleader>d', '<cmd>lua vim.lsp.util.show_line_diagnostics()<cr>', opts)
-- configuration for diagnostics
buf_set_keymap(bufnr, 'n', 'g[', '<cmd>lua vim.lsp.diagnostic.goto_prev()<cr>', opts)
buf_set_keymap(bufnr, 'n', 'g]', '<cmd>lua vim.lsp.diagnostic.goto_next()<cr>', opts)
local servers = {"rust_analyzer", "pyls", "clangd", "gopls", "tsserver", "texlab"}
for _, server in ipairs(servers) do
nvim_lsp[server].setup{
on_attach = on_attach,
capabilities = capabilities,
local servers = {
["rust_analyzer"] = {},
["pyls"] = {},
["clangd"] = {},
["gopls"] = {},
["tsserver"] = {},
["texlab"] = {},
["bashls"] = {},
["html"] = {},
["cssls"] = {}
function SetLspMappings()
nnoremap <buffer> <silent> <c-]> <cmd>lua vim.lsp.buf.definition()<cr>
nnoremap <buffer> <silent> K <cmd>lua vim.lsp.buf.hover()<cr>
nnoremap <buffer> <silent> gD <cmd>lua vim.lsp.buf.implementation()<cr>
nnoremap <buffer> <silent> <c-k> <cmd>lua vim.lsp.buf.signature_help()<cr>
nnoremap <buffer> <silent> 1gD <cmd>lua vim.lsp.buf.type_definition()<cr>
nnoremap <buffer> <silent> gr <cmd>lua vim.lsp.buf.references()<cr>
nnoremap <buffer> <silent> g0 <cmd>lua vim.lsp.buf.document_symbol()<cr>
nnoremap <buffer> <silent> gW <cmd>lua vim.lsp.buf.workspace_symbol()<cr>
nnoremap <buffer> <silent> gd <cmd>lua vim.lsp.buf.declaration()<cr>
nnoremap <buffer> <silent> <leader>r <cmd>lua vim.lsp.buf.rename()<cr>
endfunction
" only set LSP mappings when entering a file with a supported langserver
augroup lsp_mappings
autocmd!
autocmd FileType rust,c,cpp,javascript,typescript,python,go,tex :call SetLspMappings()
augroup END
set completeopt=noinsert,menuone,noselect
set shortmess+=c " avoid extra messages during completion
set pumheight=20 " display 20 items at most
nnoremap <silent> g[ <cmd>PrevDiagnosticCycle<cr>
nnoremap <silent> g] <cmd>NextDiagnosticCycle<cr>
" Enable type inlay hints
autocmd CursorMoved,InsertLeave,BufEnter,BufWinEnter,TabEnter,BufWritePost *
\ lua require'lsp_extensions'.inlay_hints{prefix = '', highlight = "Comment"}
" nnoremap <silent> g[ <cmd>PrevDiagnosticCycle<cr>
" nnoremap <silent> g] <cmd>NextDiagnosticCycle<cr>
" enable ncm2 for all buffers
" autocmd BufEnter * call ncm2#enable_for_buffer()
set completeopt=noinsert,menuone,noselect
set shortmess+=c " avoid extra messages during completion
set pumheight=20 " display 20 items at most
" Use stdio async omnisharp server
let g:OmniSharp_server_stdio = 1
" Manual installation location
let g:OmniSharp_server_path = expand('~/bin/omnisharp/run')
let g:EditorConfig_max_line_indicator = "line"