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
# 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

View file

@ -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")

View file

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

View file

@ -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',

View file

@ -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 = {
['<CR>'] = 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 }, },
}
})

View file

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

View file

@ -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

View file

@ -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