fix: Several small updates.

- Removing the load_lauunchjs call for dap as it's no longer needed.
- Cleanup of lspconfig of several lines that appear to not do anything
  in testing, and updating keymap order.
- Removing the luasnip setup section as it appears to not be required in
  testing.
- Update to nvim-cmp for luasnip relative loading and removing the
  buffer from command mode completion
- Twilight update to narrow the focus but also expand out if statements.
- ZSH re-enabling keychain despite it being slow as replacement with
  gpg-agent will take a focused session to do across environments
This commit is contained in:
2026-04-02 06:29:20 -05:00
parent fe487f2a90
commit 7b64bb09ac
6 changed files with 13 additions and 34 deletions

View File

@@ -141,7 +141,7 @@ return {
}
}
require('dap.ext.vscode').load_launchjs('.launch.json', {})
-- require('dap.ext.vscode').load_launchjs('.launch.json', {})
end,
keys = {
{

View File

@@ -1,9 +1,6 @@
return {
'neovim/nvim-lspconfig',
config = function()
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
vim.diagnostic.config({
virtual_text = {
source = 'always',
@@ -14,19 +11,12 @@ return {
}
})
vim.lsp.config('*', {
capabilities = capabilities, -- TODO: Does this do anything?
})
-- Auto set keymaps and other settings on LSP attach
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('my.lsp', {}),
callback = function(args)
local bufnr = args.buf
-- TODO: Does this do anything?
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Keyboard Mappings
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', '<C-[>', vim.diagnostic.goto_prev, bufopts)
@@ -38,8 +28,8 @@ return {
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', 'gs', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<leader><leader>f', function() vim.lsp.buf.format { async = true } end, bufopts)
vim.keymap.set('n', '<leader>r', vim.lsp.buf.rename, bufopts)
end,

View File

@@ -1,21 +1,6 @@
return {
'L3MON4D3/LuaSnip',
config = function()
local ls = require('luasnip')
local extras = require('luasnip.extras')
local l = extras.lambda
ls.setup({
snip_env = {
s = function(...)
local snip = ls.s(...)
table.insert(getfenv(2).ls_file_snippets, snip)
end,
parse = function(...)
local snip = ls.parser.parse_snippet(...)
table.insert(getfenv(2).ls_file_snippets, snip)
end,
},
})
require('luasnip.loaders.from_vscode').lazy_load()
require('luasnip.loaders.from_lua').lazy_load({ paths = "./snippets" })
end,
@@ -23,4 +8,5 @@ return {
'saadparwaiz1/cmp_luasnip', -- Wrapper to load snippets in nvim-cmp
'rafamadriz/friendly-snippets',
},
build = "make install_jsregexp"
}

View File

@@ -5,7 +5,7 @@ return {
cmp.setup {
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
require('plugins.luasnip').lsp_expand(args.body)
end,
},
completion = {
@@ -51,9 +51,9 @@ return {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' },
{ name = 'buffer' },
-- { name = 'buffer' },
}, {
{ name = 'cmdline', keyword_length = 1 },
{ name = 'cmdline' },
})
})

View File

@@ -5,10 +5,13 @@ return {
dimming = {
alpha = 0.3,
},
context = 6,
treesitter = true,
expand = {
"function",
"method",
"table",
"if_statement",
}
})
end,