Compare commits
1 Commits
2cb7fd90b3
...
1568c56b0a
Author | SHA1 | Date | |
---|---|---|---|
1568c56b0a |
@ -5,40 +5,29 @@ function build.dir(opts)
|
|||||||
local num_fargs = table.maxn(opts.fargs)
|
local num_fargs = table.maxn(opts.fargs)
|
||||||
local dir = nil
|
local dir = nil
|
||||||
|
|
||||||
for index, arg in ipairs(opts.fargs) do
|
if num_fargs == 0 then -- Find build directories
|
||||||
print(index, arg)
|
|
||||||
end
|
|
||||||
|
|
||||||
if num_fargs == 0 then
|
|
||||||
-- Find build directories
|
|
||||||
local dirs = build.list_dirs()
|
local dirs = build.list_dirs()
|
||||||
local num_dirs = table.maxn(dirs)
|
local num_dirs = table.maxn(dirs)
|
||||||
|
|
||||||
if num_dirs == 0 then
|
if num_dirs == 0 then
|
||||||
vim.cmd.echoerr('no build directories found')
|
vim.cmd.echoerr('no build directories found')
|
||||||
|
|
||||||
elseif num_dirs == 1 then
|
elseif num_dirs == 1 then
|
||||||
-- One build directory found, use it
|
-- One build directory found, use it
|
||||||
dir = dirs[1]
|
dir = dirs[1]
|
||||||
|
|
||||||
else
|
else
|
||||||
-- TODO: Implement Telescope picker
|
-- Multiple build directories found, select one
|
||||||
-- Prompt user to choose dir with to inputlist
|
require("telescope.pickers.multi") {
|
||||||
local choices = {}
|
prompt_title = "Select from the list",
|
||||||
for index, choice in ipairs(dirs) do
|
results_title = "Options",
|
||||||
table.insert(choices, tostring(index) .. ': ' .. choice)
|
sorting_strategy = "ascending",
|
||||||
end
|
layout_strategy = "vertical",
|
||||||
local index = vim.fn.inputlist(choices)
|
winblend = 10,
|
||||||
dir = dirs[index]
|
border = true,
|
||||||
print(' ' .. dir)
|
previewer = false, -- Set to true if you want a preview window
|
||||||
|
results = dir,
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif num_fargs == 1 then
|
|
||||||
-- Single argument, invoked as :BuildDir <dir>
|
|
||||||
dir = opts.fargs[1]
|
|
||||||
|
|
||||||
else
|
|
||||||
error('build#dir called with too many arguments')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if not dir then
|
if not dir then
|
||||||
|
@ -1,39 +1,26 @@
|
|||||||
return {
|
return {
|
||||||
|
|
||||||
-- 'rose-pine/neovim',
|
-- 'rose-pine/neovim', name = 'rose-pine',
|
||||||
-- name = 'rose-pine',
|
-- config = function()
|
||||||
-- config = function()
|
-- require('rose-pine').setup({
|
||||||
-- require('rose-pine').setup({
|
-- styles = {
|
||||||
-- styles = {
|
-- transparency = true,
|
||||||
-- transparency = true,
|
-- },
|
||||||
-- },
|
-- -- TODO: Ideally only certain groups would have italics disabled
|
||||||
-- -- TODO: Ideally only certain groups would have italics disabled
|
-- disable_italics = true,
|
||||||
-- disable_italics = true,
|
-- })
|
||||||
-- })
|
-- vim.cmd('colorscheme rose-pine')
|
||||||
-- vim.cmd('colorscheme rose-pine')
|
-- end
|
||||||
-- end
|
|
||||||
|
|
||||||
'rebelot/kanagawa.nvim',
|
'rebelot/kanagawa.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
local kanagawa = require('kanagawa')
|
local kanagawa = require('kanagawa')
|
||||||
|
|
||||||
local dragon = {
|
|
||||||
ui = {
|
|
||||||
bg = '#080808',
|
|
||||||
bg_m3 = '#262626',
|
|
||||||
bg_gutter = '#121212',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
kanagawa.setup({
|
kanagawa.setup({
|
||||||
commentStyle = { italic = false },
|
commentStyle = { italic = false },
|
||||||
keywordStyle = { italic = false },
|
keywordStyle = { italic = false},
|
||||||
colors = { theme = { dragon = dragon } },
|
-- TODO: make background darker
|
||||||
})
|
})
|
||||||
kanagawa.load('dragon')
|
kanagawa.load('dragon')
|
||||||
|
|
||||||
-- Override highlight groups
|
|
||||||
vim.cmd('highlight WinSeparator guifg=' .. dragon.ui.bg_m3 .. ' guibg=' .. dragon.ui.bg_m3)
|
|
||||||
vim.cmd('highlight MsgSeparator guifg=' .. dragon.ui.bg_m3 .. ' guibg=' .. dragon.ui.bg_m3)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user