Compare commits

..

2 Commits

2 changed files with 15 additions and 2 deletions

View File

@ -34,8 +34,19 @@ function build.set_dir(dirname)
local compile_commands = current_dir .. '/compile_commands.json'
local output = vim.fn.systemlist(
'compdb -p ' .. build.dir .. ' list > ' .. compile_commands)
if table.maxn(output) > 0 then
echo(vim.fn.join(output, '\n'), 'Error')
-- Remove any lines containing a compdb warning
local error = {}
local warning = 'WARNING:compdb'
for _, line in ipairs(output) do
if string.sub(line, 1, #warning) ~= warning then
table.insert(error, line)
end
end
-- Display the error message if there was one
if table.maxn(error) > 0 then
echo(vim.fn.join(error, '\n'), 'Error')
return
end

View File

@ -36,6 +36,8 @@ return {
vim.keymap.set('n', '<leader>gg', ':Telescope live_grep<CR>', opts)
vim.keymap.set('n', '<leader>gb', ':Telescope buffers<CR>', opts)
vim.keymap.set('n', '<leader>gh', ':Telescope help_tags<CR>', opts)
vim.keymap.set('n', '<leader>gs', ':Telescope lsp_document_symbols<CR>', opts)
vim.keymap.set('n', '<leader>gr', ':Telescope lsp_references<CR>', opts)
require('easypick').setup({
pickers = { },