kickstart - working

This commit is contained in:
jimrothstein 2023-11-15 11:58:04 -08:00
parent a7ec8e276a
commit 989b3b4eba
4 changed files with 67 additions and 18 deletions

View file

@ -180,8 +180,12 @@ require('lazy').setup({
event = "BufReadPre",
},
-- "gc" to comment visual regions/lines
{ 'numToStr/Comment.nvim', opts = {} },
-------------------
-- Comments.nvim
-------------------
-- 2023-11-12 Comment.nvim keymaps conflict with my Telescope keymaps
-- { 'numToStr/Comment.nvim', opts = {} },
-- Fuzzy Finder (files, lsp, etc)
{
@ -277,6 +281,12 @@ Add to bottom of *.qmd, *.R file:
--]]
--
-- :h 'fo'
-- where does line belong?
-- +r comments will be autoadded
vim.cmd([[ set formatoptions+=r]])
-- always display top/bottom 8 lines
vim.opt.scrolloff = 8
vim.opt.colorcolumn = "80"
@ -603,11 +613,12 @@ mason_lspconfig.setup_handlers {
end,
}
-- nvim-cmp configuration
-- [[ Configure hrsh7th nvim-cmp ]]
-- See `:help cmp`
local cmp = require 'cmp'
local luasnip = require 'luasnip'
local ls = require 'luasnip'
cmp.setup {
snippet = {
@ -625,16 +636,21 @@ cmp.setup {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
---------------------------------------
-- TJ says don't use <TAB> this way
---------------------------------------
--
-- TAB selects NEXT item (CR to complete)
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { 'i', 's' }),
-- ['<Tab>'] = cmp.mapping(function(fallback)
-- if cmp.visible() then
-- cmp.select_next_item()
-- elseif luasnip.expand_or_locally_jumpable() then
-- luasnip.expand_or_jump()
-- else
-- fallback()
-- end
-- end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()