Lots of general updates.

This commit is contained in:
pfm 2022-10-05 22:44:12 -05:00
parent dbc989a79e
commit f62ef92753
8 changed files with 44 additions and 26 deletions

View file

@ -22,6 +22,9 @@ font pango:Iosevka Term 11
# The combination of xss-lock, nm-applet and pactl is a popular choice, so # 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. # 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 # 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. # screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork

View file

@ -4,7 +4,7 @@ local opt = vim.opt -- Set options (global/buffer/windows-scoped)
----------------------------------------------------------- -----------------------------------------------------------
-- General -- General
----------------------------------------------------------- -----------------------------------------------------------
opt.mouse = 'a' -- Enable mouse support opt.mouse = '' -- Disable mouse support
opt.swapfile = false -- Don't use swapfile opt.swapfile = false -- Don't use swapfile
opt.modelines = 0 -- Disable modelines opt.modelines = 0 -- Disable modelines
opt.encoding = 'utf-8' -- Set default encoding to UTF-8 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. -- 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.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 = { opt.wildignore = {
'*.class', '*.pyc', '*.swp', '*.o', '*.jar', '*/tmp/*', '*.zip', '*.class', '*.pyc', '*.swp', '*.o', '*.jar', '*/tmp/*', '*.zip',
'*.tar', '*.gz', '*.bz2', '*.xz', '*/.git/*', '*/.metals/*', '*.tar', '*.gz', '*.bz2', '*.xz', '*/.git/*', '*/.metals/*',
'*/.bloop/*', '*/.bsp/*', '*/node_modules/*' '*/.bloop/*', '*/.bsp/*', '*/node_modules/*'
} }
@ -99,4 +100,4 @@ opt.hlsearch = true
----------------------------------------------------------- -----------------------------------------------------------
-- Disable nvim intro -- Disable nvim intro
opt.shortmess:append "sI" opt.shortmess:append("sI")

View file

@ -36,15 +36,18 @@ map('n', '<leader>bd', ':bd<CR>')
-- Close the quickfix window -- Close the quickfix window
map('n', '<leader>cq', ':ccl<CR>') map('n', '<leader>cq', ':ccl<CR>')
-- 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 -- Use Tab to jump to the next option in a popup menu
vim.keymap.set('i', '<Tab>', function() --vim.keymap.set('i', '<Tab>', function()
return vim.fn.pumvisible() == 1 and '<C-N>' or '<Tab>' -- return vim.fn.pumvisible() == 1 and '<C-N>' or '<Tab>'
end, {expr = true}) --end, {expr = true})
-- Use Shift+Tab to jump to the previous option in a popup menu -- Use Shift+Tab to jump to the previous option in a popup menu
vim.keymap.set('i', '<S-Tab>', function() --vim.keymap.set('i', '<S-Tab>', function()
return vim.fn.pumvisible() == 1 and '<C-P>' or '<Tab>' -- return vim.fn.pumvisible() == 1 and '<C-P>' or '<Tab>'
end, {expr = true}) --end, {expr = true})
----------------------------------------------------------- -----------------------------------------------------------
-- Telescope -- Telescope
@ -107,14 +110,14 @@ vim.g.floaterm_keymap_next = '<leader>tn'
vim.g.floaterm_keymap_toggle = '<leader>tt' vim.g.floaterm_keymap_toggle = '<leader>tt'
----------------------------------------------------------- -----------------------------------------------------------
-- nnn File Manager -- nvim-tree
----------------------------------------------------------- -----------------------------------------------------------
-- Toggle the nnn file explorer in a vertical split. -- Toggle the file tree
map('n', '<C-A>n', '<cmd>NnnExplorer<CR>') map('n', '<C-A>tt', '<cmd>NvimTreeToggle<CR>')
-- Toggle the nnn file picker in a floating window. -- Find the current buffer in the file tree
map('n', '<C-A>p', '<cmd>NnnPicker %:p:h<CR>') map('n', '<C-A>tf', '<cmd>NvimTreeFindFile<CR>')
----------------------------------------------------------- -----------------------------------------------------------
-- LSP -- LSP

View file

@ -125,11 +125,15 @@ return require('packer').startup(function(use)
end end
} }
-- File manager for Neovim (backed by nnn) -- nvim-tree for when I want to view files
use { use {
'luukvbaal/nnn.nvim', 'kyazdani42/nvim-tree.lua',
config = function() requires = {
require('nnn').setup() 'kyazdani42/nvim-web-devicons'
},
tag = 'nightly',
config = function()
require('nvim-tree').setup()
end end
} }
@ -148,6 +152,9 @@ return require('packer').startup(function(use)
-- Racket support -- Racket support
use 'benknoble/vim-racket' use 'benknoble/vim-racket'
-- PlantUML syntax
use 'aklt/plantuml-syntax'
-- Conjure: Supports all Lisps that I work with. -- Conjure: Supports all Lisps that I work with.
use { use {
'Olical/conjure', 'Olical/conjure',

View file

@ -11,7 +11,7 @@ cmp.setup{
{ name = 'nvim_lsp' }, { name = 'nvim_lsp' },
{ name = 'luasnip' }, { name = 'luasnip' },
{ name = 'path' }, { name = 'path' },
{ name = 'buffer', option = { keyword_length = 4 }, }, { name = 'buffer', option = { keyword_length = 5 }, },
}, },
mapping = { mapping = {
['<CR>'] = cmp.mapping.confirm({ select = true }), ['<CR>'] = cmp.mapping.confirm({ select = true }),
@ -38,6 +38,6 @@ cmp.setup.filetype('racket', {
{ name = 'conjure' }, { name = 'conjure' },
{ name = 'luasnip' }, { name = 'luasnip' },
{ name = 'path' }, { name = 'path' },
{ name = 'buffer', option = { keyword_length = 4 }, }, { name = 'buffer', option = { keyword_length = 5 }, },
} }
}) })

View file

@ -47,5 +47,8 @@ lsp.sumneko_lua.setup {
}, },
} }
-- bash-language-server
lsp.bashls.setup{}
-- texlab = latex language server -- texlab = latex language server
lsp.texlab.setup{} lsp.texlab.setup{}

View file

@ -3,22 +3,23 @@
-- Autocmd that will actually be in charging of starting the whole thing -- Autocmd that will actually be in charging of starting the whole thing
local nvim_metals_group = vim.api.nvim_create_augroup( local nvim_metals_group = vim.api.nvim_create_augroup(
'nvim-metals', 'nvim-metals',
{ {
clear = true clear = true
} }
) )
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
pattern = { 'scala', 'sbt', 'java' }, pattern = { 'scala', 'sbt', 'java' },
callback = function() callback = function()
metals_config = require('metals').bare_config() local metals_config = require('metals').bare_config()
-- Capabilities for completion. -- Capabilities for completion.
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
metals_config.settings = { metals_config.settings = {
serverVersion = "0.11.8+167-188f3c7c-SNAPSHOT",
showImplicitArguments = true, showImplicitArguments = true,
showInferredType = true, showInferredType = true,
superMethodLensesEnabled = false superMethodLensesEnabled = false

View file

@ -1,6 +1,6 @@
[user] [user]
email = pgfm@meager.io email = pgfm@meager.io
name = pgfm name = pfm
[alias] [alias]
ll = log --oneline --decorate --graph ll = log --oneline --decorate --graph
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate