added buffer select menu
This commit is contained in:
parent
dbb9af29d5
commit
23662ac758
|
|
@ -2,7 +2,7 @@
|
||||||
-- Configuration Tools
|
-- Configuration Tools
|
||||||
--
|
--
|
||||||
local ct = require('conftool')
|
local ct = require('conftool')
|
||||||
local defs = require('defs')
|
-- local defs = require('defs')
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Maps
|
-- Maps
|
||||||
|
|
@ -54,26 +54,27 @@ for func_name, _ in pairs(lsp_buf) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function toggle_background()
|
-- function toggle_background()
|
||||||
local bg = vim.o.background
|
-- local bg = vim.o.background
|
||||||
|
--
|
||||||
|
-- if bg == "dark" then
|
||||||
|
-- vim.cmd("set background=light")
|
||||||
|
-- else
|
||||||
|
-- vim.cmd("set background=dark")
|
||||||
|
-- end
|
||||||
|
--
|
||||||
|
-- -- Query the current colorscheme
|
||||||
|
-- --[[ local colorscheme = vim.fn.executable('colorscheme') or ""
|
||||||
|
-- -- colorscheme = colorscheme:match("^%s*(.-)%s*$")
|
||||||
|
--
|
||||||
|
-- -- Reload the colorscheme if it was set
|
||||||
|
-- if colorscheme ~= "" then
|
||||||
|
-- vim.cmd("colorscheme " .. colorscheme)
|
||||||
|
-- end ]]--
|
||||||
|
-- end
|
||||||
|
-- ct.map('n', '<Leader>c', '<cmd>lua toggle_background()<CR>')
|
||||||
|
|
||||||
if bg == "dark" then
|
ct.map('n', '<Leader>b', ':buffer<Space><C-z>')
|
||||||
vim.cmd("set background=light")
|
|
||||||
else
|
|
||||||
vim.cmd("set background=dark")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Query the current colorscheme
|
|
||||||
--[[ local colorscheme = vim.fn.executable('colorscheme') or ""
|
|
||||||
-- colorscheme = colorscheme:match("^%s*(.-)%s*$")
|
|
||||||
|
|
||||||
-- Reload the colorscheme if it was set
|
|
||||||
if colorscheme ~= "" then
|
|
||||||
vim.cmd("colorscheme " .. colorscheme)
|
|
||||||
end ]]--
|
|
||||||
end
|
|
||||||
|
|
||||||
ct.map('n', '<Leader>b', '<cmd>lua toggle_background()<CR>')
|
|
||||||
--
|
--
|
||||||
-- Commands
|
-- Commands
|
||||||
--
|
--
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue