From f62ef92753125931f932967788ab8fceb5e2cba4 Mon Sep 17 00:00:00 2001 From: pfm Date: Wed, 5 Oct 2022 22:44:12 -0500 Subject: [PATCH] Lots of general updates. --- .config/i3/config | 3 +++ .config/nvim/lua/general.lua | 9 +++++---- .config/nvim/lua/keymap.lua | 25 ++++++++++++++----------- .config/nvim/lua/packer_init.lua | 15 +++++++++++---- .config/nvim/lua/plugins/cmp.lua | 4 ++-- .config/nvim/lua/plugins/lsp.lua | 3 +++ .config/nvim/lua/plugins/scala.lua | 9 +++++---- .gitconfig | 2 +- 8 files changed, 44 insertions(+), 26 deletions(-) diff --git a/.config/i3/config b/.config/i3/config index 0f90636..f45c64e 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -22,6 +22,9 @@ font pango:Iosevka Term 11 # The combination of xss-lock, nm-applet and pactl is a popular choice, so # they are included here as an example. Modify as you see fit. +# Set the desktop background +exec --no-startup-id feh --bg-scale /home/pfm/images/backgrounds/nasa_carina_nircam.jpg + # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the # screen before suspend. Use loginctl lock-session to lock your screen. exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork diff --git a/.config/nvim/lua/general.lua b/.config/nvim/lua/general.lua index fb5dd25..b72fcb3 100644 --- a/.config/nvim/lua/general.lua +++ b/.config/nvim/lua/general.lua @@ -4,7 +4,7 @@ local opt = vim.opt -- Set options (global/buffer/windows-scoped) ----------------------------------------------------------- -- General ----------------------------------------------------------- -opt.mouse = 'a' -- Enable mouse support +opt.mouse = '' -- Disable mouse support opt.swapfile = false -- Don't use swapfile opt.modelines = 0 -- Disable modelines opt.encoding = 'utf-8' -- Set default encoding to UTF-8 @@ -13,11 +13,12 @@ opt.encoding = 'utf-8' -- Set default encoding to UTF-8 -- low, or the behavior will start getting wonky and always show which-key. opt.timeoutlen = 500 -- Time in ms to wait for a sequnece to complete -opt.shortmess:remove("F"):append("c") +opt.shortmess:remove("F") +opt.shortmess:append("c") opt.wildignore = { '*.class', '*.pyc', '*.swp', '*.o', '*.jar', '*/tmp/*', '*.zip', - '*.tar', '*.gz', '*.bz2', '*.xz', '*/.git/*', '*/.metals/*', + '*.tar', '*.gz', '*.bz2', '*.xz', '*/.git/*', '*/.metals/*', '*/.bloop/*', '*/.bsp/*', '*/node_modules/*' } @@ -99,4 +100,4 @@ opt.hlsearch = true ----------------------------------------------------------- -- Disable nvim intro -opt.shortmess:append "sI" +opt.shortmess:append("sI") diff --git a/.config/nvim/lua/keymap.lua b/.config/nvim/lua/keymap.lua index fd6b692..0994d8f 100644 --- a/.config/nvim/lua/keymap.lua +++ b/.config/nvim/lua/keymap.lua @@ -36,15 +36,18 @@ map('n', 'bd', ':bd') -- Close the quickfix window map('n', 'cq', ':ccl') +-- These appear broken with latest neovim, and nvim-cmp has +-- settings that work in any case. Keep as a reminder for a +-- few weeks just in case. -- Use Tab to jump to the next option in a popup menu -vim.keymap.set('i', '', function() - return vim.fn.pumvisible() == 1 and '' or '' -end, {expr = true}) +--vim.keymap.set('i', '', function() +-- return vim.fn.pumvisible() == 1 and '' or '' +--end, {expr = true}) -- Use Shift+Tab to jump to the previous option in a popup menu -vim.keymap.set('i', '', function() - return vim.fn.pumvisible() == 1 and '' or '' -end, {expr = true}) +--vim.keymap.set('i', '', function() +-- return vim.fn.pumvisible() == 1 and '' or '' +--end, {expr = true}) ----------------------------------------------------------- -- Telescope @@ -107,14 +110,14 @@ vim.g.floaterm_keymap_next = 'tn' vim.g.floaterm_keymap_toggle = 'tt' ----------------------------------------------------------- --- nnn File Manager +-- nvim-tree ----------------------------------------------------------- --- Toggle the nnn file explorer in a vertical split. -map('n', 'n', 'NnnExplorer') +-- Toggle the file tree +map('n', 'tt', 'NvimTreeToggle') --- Toggle the nnn file picker in a floating window. -map('n', 'p', 'NnnPicker %:p:h') +-- Find the current buffer in the file tree +map('n', 'tf', 'NvimTreeFindFile') ----------------------------------------------------------- -- LSP diff --git a/.config/nvim/lua/packer_init.lua b/.config/nvim/lua/packer_init.lua index 1d48a96..69110ae 100644 --- a/.config/nvim/lua/packer_init.lua +++ b/.config/nvim/lua/packer_init.lua @@ -125,11 +125,15 @@ return require('packer').startup(function(use) end } - -- File manager for Neovim (backed by nnn) + -- nvim-tree for when I want to view files use { - 'luukvbaal/nnn.nvim', - config = function() - require('nnn').setup() + 'kyazdani42/nvim-tree.lua', + requires = { + 'kyazdani42/nvim-web-devicons' + }, + tag = 'nightly', + config = function() + require('nvim-tree').setup() end } @@ -148,6 +152,9 @@ return require('packer').startup(function(use) -- Racket support use 'benknoble/vim-racket' + -- PlantUML syntax + use 'aklt/plantuml-syntax' + -- Conjure: Supports all Lisps that I work with. use { 'Olical/conjure', diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua index 527fdf7..db4131d 100644 --- a/.config/nvim/lua/plugins/cmp.lua +++ b/.config/nvim/lua/plugins/cmp.lua @@ -11,7 +11,7 @@ cmp.setup{ { name = 'nvim_lsp' }, { name = 'luasnip' }, { name = 'path' }, - { name = 'buffer', option = { keyword_length = 4 }, }, + { name = 'buffer', option = { keyword_length = 5 }, }, }, mapping = { [''] = cmp.mapping.confirm({ select = true }), @@ -38,6 +38,6 @@ cmp.setup.filetype('racket', { { name = 'conjure' }, { name = 'luasnip' }, { name = 'path' }, - { name = 'buffer', option = { keyword_length = 4 }, }, + { name = 'buffer', option = { keyword_length = 5 }, }, } }) diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua index 87d830c..db51801 100644 --- a/.config/nvim/lua/plugins/lsp.lua +++ b/.config/nvim/lua/plugins/lsp.lua @@ -47,5 +47,8 @@ lsp.sumneko_lua.setup { }, } +-- bash-language-server +lsp.bashls.setup{} + -- texlab = latex language server lsp.texlab.setup{} diff --git a/.config/nvim/lua/plugins/scala.lua b/.config/nvim/lua/plugins/scala.lua index eef687a..993c120 100644 --- a/.config/nvim/lua/plugins/scala.lua +++ b/.config/nvim/lua/plugins/scala.lua @@ -3,22 +3,23 @@ -- Autocmd that will actually be in charging of starting the whole thing local nvim_metals_group = vim.api.nvim_create_augroup( - 'nvim-metals', - { - clear = true + 'nvim-metals', + { + clear = true } ) vim.api.nvim_create_autocmd('FileType', { pattern = { 'scala', 'sbt', 'java' }, callback = function() - metals_config = require('metals').bare_config() + local metals_config = require('metals').bare_config() -- Capabilities for completion. local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) metals_config.settings = { + serverVersion = "0.11.8+167-188f3c7c-SNAPSHOT", showImplicitArguments = true, showInferredType = true, superMethodLensesEnabled = false diff --git a/.gitconfig b/.gitconfig index 29f77c9..e531981 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,6 +1,6 @@ [user] email = pgfm@meager.io - name = pgfm + name = pfm [alias] ll = log --oneline --decorate --graph ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate