diff options
Diffstat (limited to 'neovim/.config')
-rw-r--r-- | neovim/.config/nvim/init.vim | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index 1f5e149..e764ba2 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -140,6 +140,16 @@ Plug 'ryanoasis/vim-devicons' call plug#end() lua << EOF +-- Override the weird Class & Struct icons, which usually resolve to a +-- "mathcal"-Style letter +vim.g.symbols_outline = { + width = 30, + symbols = { + Class = {icon = "", hl = "TSType"}, + Struct = {icon = "", hl = "TSType"}, + } +} + -- Setup LSP status to display the number of diagnostics in the statusbar local lsp_status = require('lsp-status') local kind_labels_mt = {__index = function(_, k) return k end} @@ -179,6 +189,8 @@ cmp.setup({ c = cmp.mapping.close(), }), ['<CR>'] = cmp.mapping.confirm({ select = true }), + ['<Down>'] = cmp.mapping(cmp.mapping.select_next_item()), + ['<Up>'] = cmp.mapping(cmp.mapping.select_prev_item()), }, sources = cmp.config.sources({ { name = 'nvim_lsp' }, @@ -195,6 +207,7 @@ vim.api.nvim_set_keymap('n', '<space>e', '<cmd>lua vim.diagnostic.open_float()<C vim.api.nvim_set_keymap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts) vim.api.nvim_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts) vim.api.nvim_set_keymap('n', '<space>q', '<cmd>lua vim.diagnostic.setloclist()<CR>', opts) +vim.api.nvim_set_keymap('v', '\\qf', '<ESC><cmd>lua vim.lsp.buf.range_formatting()<CR>', opts) -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer @@ -226,7 +239,7 @@ end -- Use a loop to conveniently call 'setup' on multiple servers and -- map buffer local keybindings when the language server attaches -local servers = { 'clangd', 'hls', 'rust_analyzer', 'texlab', 'pylsp' } +local servers = { 'clangd', 'hls', 'rust_analyzer', 'texlab', 'jedi_language_server', 'tsserver' } for _, lsp in ipairs(servers) do local config = { on_attach = on_attach, |