From 2a7e660f61ea69ed0e76139529bdd6d034775e2f Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 5 Apr 2022 09:59:12 -0500 Subject: [PATCH] I guess tab works again? --- common/git/config | 3 --- common/neovim/lua/plugins.lua | 10 +++++++--- common/neovim/lua/statusline.lua | 12 +++++++++++- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/common/git/config b/common/git/config index 97c83c0..e0bc12e 100644 --- a/common/git/config +++ b/common/git/config @@ -63,9 +63,6 @@ -c 'silent execute \"normal gg2dd\"' \ -c 'silent setlocal nobuflisted buftype=nofile bufhidden=wipe noswapfile' -[url "git@git-p1ap1.divvy.co:"] - insteadOf = https://git-p1ap1.divvy.co - [gpg] program = gpg2 diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua index 37428bd..787ab45 100644 --- a/common/neovim/lua/plugins.lua +++ b/common/neovim/lua/plugins.lua @@ -93,8 +93,11 @@ packer.startup(function() i = cmp.mapping.abort(), c = cmp.mapping.close(), }, + [''] = cmp.config.disable, + [''] = cmp.config.disable, [''] = cmp.mapping.confirm{select = true}, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - [""] = cmp.mapping(function(fallback) + --[[ [""] = cmp.mapping(function(fallback) + if cmp.visible() then cmp.select_next_item() elseif luasnip.expand_or_jumpable() then @@ -102,7 +105,7 @@ packer.startup(function() elseif has_words_before() then cmp.complete() else - -- fallback() + fallback() end end, { "i", "s" }), [""] = cmp.mapping(function(fallback) @@ -111,9 +114,10 @@ packer.startup(function() elseif luasnip.jumpable(-1) then luasnip.jump(-1) else - -- fallback() + fallback() end end, { "i", "s" }), + ]]-- }, sources = cmp.config.sources({ { name = 'nvim_lsp' }, diff --git a/common/neovim/lua/statusline.lua b/common/neovim/lua/statusline.lua index c5061d1..91c18da 100644 --- a/common/neovim/lua/statusline.lua +++ b/common/neovim/lua/statusline.lua @@ -69,8 +69,18 @@ local status_line_buffers = function() end end +local whitespace = function() + local result = "" + if vim.o.expandtab == true then + result = result .. vim.o.shiftwidth .. "S" + else + result = result .. vim.o.tabstop .. "T" + end + return result +end + function StatusLine() - return status_line_buffers() .. '%*%=%c,%l/%L (%p%%)' + return status_line_buffers() .. '%*%=%{&filetype} %l;%c (%p%%/%L) ' .. whitespace() end vim.o.statusline = '%!v:lua.StatusLine()'