From e6ff7fc758abcc5338f2eb4c107063def3eee871 Mon Sep 17 00:00:00 2001 From: Rawley Fowler <75388349+rawleyfowler@users.noreply.github.com> Date: Sun, 17 Jul 2022 08:21:22 -0600 Subject: [PATCH] Add solargraph --- neovim/init.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/neovim/init.lua b/neovim/init.lua index 88ab848..d89749f 100644 --- a/neovim/init.lua +++ b/neovim/init.lua @@ -3,10 +3,13 @@ local cmd = vim.api.nvim_command local au = vim.api.nvim_create_autocmd local plug = vim.fn['plug#'] +-- Plugins vim.call('plug#begin', '~/.config/nvim/plugged') plug('jnurmine/zenburn') plug('ap/vim-css-color') plug('ap/vim-buftabline') +plug('kana/vim-textobj-user') +plug('whatyouhide/vim-textobj-erb') plug('dag/vim-fish') plug('kassio/neoterm') plug('tpope/vim-dispatch') @@ -51,6 +54,7 @@ set.autoindent = true set.autowrite = true set.ai = true set.wildignore = {'*/cache/*', '*/tmp*'} + -- Keybindings function map(mode, lhs, rhs, opts) options = {} @@ -59,12 +63,15 @@ function map(mode, lhs, rhs, opts) end vim.api.nvim_set_keymap(mode, lhs, rhs, options) end + ---- Cycling through buffers map('n', '', ':bprev', { noremap = true }) map('n', '', ':bnext', { noremap = true }) + ---- NERDTree map('n', '', ':NERDTreeToggle', { noremap = true }) map('n', '', ':NERDTreeClose', { noremap = true }) + ---- Ripgrep map('n', '', ':Rg') ---- Auto-complete @@ -126,7 +133,7 @@ local on_attach = function(client, bufnr) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'f', 'lua vim.lsp.buf.formatting()', opts) end local cmp_capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) -local servers = { 'clojure_lsp', 'gopls', 'clangd', 'tsserver' } +local servers = { 'clojure_lsp', 'gopls', 'clangd', 'tsserver', 'solargraph' } for _, lsp in pairs(servers) do require('lspconfig')[lsp].setup { on_attach = on_attach, @@ -136,6 +143,7 @@ for _, lsp in pairs(servers) do } } end + -- Java auto complete/LSP local jdtls_cfg = { cmd = { @@ -159,7 +167,6 @@ if vim.bo.filetype == 'java' then end -- 2 Tab space standard languages --- Clojure and Common Lisp style is 2 space indent vim.cmd([[ autocmd Filetype ruby,rb,clojure,clj,lisp,lsp,cl,l,javascript,js,typescript,ts setlocal tabstop=2 shiftwidth=2 ]])