From e0c6a0448f31d790348f24ee61d15db969f676eb Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Tue, 14 Nov 2023 21:08:43 +0000 Subject: Some more configuration options --- ftplugin/java.vim | 28 ++++++++++++++++++++++++++++ init.vim | 25 ++++++++++++++++++++----- lua/lsp.lua | 21 +++++++++++---------- 3 files changed, 59 insertions(+), 15 deletions(-) diff --git a/ftplugin/java.vim b/ftplugin/java.vim index 238ca22..8bf603c 100644 --- a/ftplugin/java.vim +++ b/ftplugin/java.vim @@ -1 +1,29 @@ setl textwidth=100 + +inoreabbrev public public +inoreabbrev upblic public +inoreabbrev pbulic public +inoreabbrev pbulci public +inoreabbrev pulbic public +inoreabbrev pubilc public +inoreabbrev publci public + +inoreabbrev rpivate private +inoreabbrev pirvate private +inoreabbrev prviate private +inoreabbrev priavte private +inoreabbrev privtae private +inoreabbrev privaet private +inoreabbrev pirvaet private +inoreabbrev priavet private +inoreabbrev piravet private + +inoreabbrev tsatic static +inoreabbrev sattic static +inoreabbrev sttaic static +inoreabbrev staitc static +inoreabbrev statci static + +inoreabbrev ovid void +inoreabbrev viod void +inoreabbrev vodi void diff --git a/init.vim b/init.vim index 45bfeaf..5536a9a 100644 --- a/init.vim +++ b/init.vim @@ -45,8 +45,11 @@ Plug 'nvim-treesitter/nvim-treesitter-textobjects' Plug 'stevearc/aerial.nvim' Plug 'tpope/vim-surround' +Plug 'nvim-lualine/lualine.nvim' +Plug 'linrongbin16/lsp-progress.nvim' Plug 'git://git.josher.dev/fieldmarshal.vim.git' +Plug 'git://git.josher.dev/bulletjava.vim.git' if has('rneovim') Plug 'git://git.josher.dev/rneovim-userregs.git' endif @@ -185,6 +188,10 @@ command! TERM exec "term sh -c " . shellescape(printf("cd %s && exec ", shellesc " W = w. I often click when typing :w command! W w +augroup lualine_augroup + autocmd! + autocmd User LspProgressStatusUpdated lua require("lualine").refresh() +augroup END lua << EOF @@ -198,6 +205,14 @@ lua << EOF -- CiderLSP vim.opt.completeopt = { "menu", "menuone", "noselect" } + require("lualine").setup({ + sections = { + lualine_a = { "mode" }, + lualine_b = { "filename" }, + lualine_c = { + } + } + }) require("lsp") require("lspconfig") @@ -226,14 +241,14 @@ lua << EOF require('aerial').setup({ -- optionally use on_attach to set keymaps when aerial has attached to a buffer on_attach = function(bufnr) - -- Jump forwards/backwards with '{' and '}' - vim.keymap.set('n', '{', 'AerialPrev', {buffer = bufnr}) - vim.keymap.set('n', '}', 'AerialNext', {buffer = bufnr}) + -- Jump forwards/backwards with '[[' and ']]' + vim.keymap.set('n', '[[', 'AerialPrev', {buffer = bufnr}) + vim.keymap.set('n', ']]', 'AerialNext', {buffer = bufnr}) end }) --- You probably also want to set a keymap to toggle aerial -vim.keymap.set('n', 'a', 'AerialToggle!') + -- You probably also want to set a keymap to toggle aerial + vim.keymap.set('n', 'a', 'AerialToggle!') EOF diff --git a/lua/lsp.lua b/lua/lsp.lua index 27a8925..0902e06 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -88,18 +88,10 @@ cmp.setup({ [""] = cmp.mapping.close(), [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - else - fallback() -- The fallback function sends a already mapped key. In this case, it's probably ``. - end + cmp.select_next_item() end, { "i", "s" }), [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - else - fallback() -- The fallback function sends a already mapped key. In this case, it's probably ``. - end + cmp.select_prev_item() end, { "i", "s" }), [""] = cmp.mapping(function(fallback) @@ -225,6 +217,15 @@ nvim_lsp.hls.setup({ nvim_lsp.pylsp.setup({ capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()), on_attach = M.on_attach, + settings = { + pylsp = { + plugins = { + pycodestyle = { + enabled = false + } + } + } + } }) nvim_lsp.bash.setup({ -- cgit