Merge branch 'master' of git.blakenorth.net/home/git/dotfiles

This commit is contained in:
PowerUser64 2022-08-19 08:35:41 -07:00
commit 06d5534617
3 changed files with 30 additions and 34 deletions

View file

@ -30,9 +30,3 @@ require('blake.settings')
-- Downsides:
-- - Hardest (requires me to make a for loop, and I don't know lua)
-- - Doesn't take advantage of advanced plugin manager features (ex: dependencies)
-- Plugins to install:
-- lightspeed.nvim
-- lightbulb?
-- telescope
-- - trouble.nvim

View file

@ -150,34 +150,32 @@ M.cmp = function()
{ name = 'path' },
},
formatting = {
fields = { "abbr", "kind", "menu" },
format = function(entry, vim_item)
-- fancy icons and a name of kind
require('lspkind').cmp_format({
mode = 'symbol', -- show only symbol annotations
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
-- The function below will be called before any actual modifications from lspkind
-- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))
-- before = function (entry, vim_item)
-- ...
-- return vim_item
-- end
})
local kind = require("lspkind").cmp_format({ mode = "symbol", maxwidth = 50 })(entry, vim_item)
-- local strings = vim.split(kind.kind, "%s", { trimempty = true })
-- set a name for each source
vim_item.kind = " " .. kind.kind
vim_item.menu = ({
path = "[Path]",
nvim_lua = "[Lua]",
nvim_lsp = "[LSP]",
treesitter = "[TS]",
calc = "[Calc]",
spell = "[Spell]",
cmdline = "[cmdline]",
buffer = "[Buffer]",
})[entry.source.name]
path = "[path]",
emoji = "[emoji]",
nvim_lua = "[lua]",
nvim_lsp = "[lsp]",
treesitter = "[ts]",
calc = "[calc]",
spell = "[spell]",
cmdline = "[cmd]",
buffer = "[buf]",
luasnip = "[snip]",
})[entry.source.name] or "unknown type"
return vim_item
end,
},
window = {
completion = {
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
},
documentation = {
border = { "", "", "", "", "", "", "", "" },
},
@ -186,7 +184,6 @@ M.cmp = function()
ghost_text = true,
}
}
-- Thanks to iwataka on github for this bit
local search_config = {
mapping = cmp.mapping.preset.cmdline(),
@ -194,11 +191,9 @@ M.cmp = function()
{ name = 'buffer' },
}
}
-- Use buffer source for `/` and `?`
cmp.setup.cmdline('/', search_config)
cmp.setup.cmdline('?', search_config)
-- `:` cmdline setup.
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),

View file

@ -22,7 +22,6 @@ return require('packer').startup({function()
}
-- Packer
-- use 'wbthomason/packer.nvim',
use { -- packer: plugin manager
'wbthomason/packer.nvim',
config = function()
@ -90,6 +89,9 @@ return require('packer').startup({function()
use { -- ifdef-highlighting: highlight c/c++ ifdef's - :Define :Undefine
'vim-scripts/ifdef-highlighting'
}
use { -- lumen: make vim respect the system light/dark theme setting (linux + macos)
'vimpostor/vim-lumen',
}
-- IDE features
---- LSP
@ -319,9 +321,6 @@ return require('packer').startup({function()
use { -- matchup: Use the percent (%) key for more things
'andymass/vim-matchup',
}
-- use { -- lightspeed: Jump around in files quickly
-- 'ggandor/lightspeed.nvim',
-- }
use { -- indentline: Line indent indicators
'lukas-reineke/indent-blankline.nvim',
config = function()
@ -352,6 +351,12 @@ return require('packer').startup({function()
vim.api.nvim_set_keymap("n", "<Leader>af", ":lua require('neogen').generate('func')<CR>", opts)
end
}
use { -- hop.nvim: Jump around files quickly
'phaazon/hop.nvim',
config = function()
require('hop').setup { keys = 'etovxqpdygfblzhckisuran' }
end
}
-- Conveniences
use { -- sort motion: (gs)
@ -474,6 +479,9 @@ return require('packer').startup({function()
vim.cmd [[ autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '+' | execute 'OSCYankReg +' | endif ]]
end
}
use { -- fixcursorhold: fix neovim bug #12587 - https://github.com/neovim/neovim/issues/12587
'antoinemadec/FixCursorHold.nvim',
}
use { -- rhysd: clever-split: split calculation based on pane dimensions - CS or CleverSplit
'rhysd/clever-split.vim',
config = function()
@ -541,7 +549,6 @@ return require('packer').startup({function()
'tpope/vim-sleuth',
}
-- Bootstrap packer if needed {
if (packer_bootstrap) then
print('Please wait for packer to install plugins')