Nvim: minor cmake and telescope changes

This commit is contained in:
Robert Kmieć
2024-04-22 23:54:16 +02:00
parent cd711ea4bf
commit 6e13939c5b
5 changed files with 20 additions and 21 deletions

View File

@@ -9,6 +9,7 @@ return {
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
throttle = true, -- Throttles plugin updates (may improve performance) throttle = true, -- Throttles plugin updates (may improve performance)
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
mode = 'topline',
patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries. patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries.
-- For all filetypes -- For all filetypes
-- Note that setting an entry here replaces all other patterns for this entry. -- Note that setting an entry here replaces all other patterns for this entry.
@@ -35,7 +36,15 @@ return {
-- Treat patterns.rust as a Lua pattern (i.e "^impl_item$" will -- Treat patterns.rust as a Lua pattern (i.e "^impl_item$" will
-- exactly match "impl_item" only) -- exactly match "impl_item" only)
rust = true, rust = true,
} },
on_attach = function(buf)
local max_filesize = 100 * 1024
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return false
end
return true
end
} }
end end
} }

View File

@@ -19,7 +19,7 @@ return {
-- Options other than `highlight' and `priority' only work -- Options other than `highlight' and `priority' only work
-- if `inline' is disabled -- if `inline' is disabled
-- Only show inlay hints for the current line -- Only show inlay hints for the current line
only_current_line = true, only_current_line = false,
-- Event which triggers a refresh of the inlay hints. -- Event which triggers a refresh of the inlay hints.
-- You can make this { "CursorMoved" } or { "CursorMoved,CursorMovedI" } but -- You can make this { "CursorMoved" } or { "CursorMoved,CursorMovedI" } but
-- not that this may cause higher CPU usage. -- not that this may cause higher CPU usage.

View File

@@ -3,7 +3,7 @@ return {
dependencies = { dependencies = {
'debugloop/telescope-undo.nvim', 'debugloop/telescope-undo.nvim',
'molecule-man/telescope-menufacture', 'molecule-man/telescope-menufacture',
'xiyaowong/telescope-emoji.nvim', 'nvim-telescope/telescope-symbols.nvim',
{ {
{ {
"isak102/telescope-git-file-history.nvim", "isak102/telescope-git-file-history.nvim",
@@ -22,23 +22,10 @@ return {
main_menu = { [{'i', 'n'}] = '<C-o>' } main_menu = { [{'i', 'n'}] = '<C-o>' }
} }
}, },
emoji = {
action = function(emoji)
-- argument emoji is a table.
-- {name="", value="", cagegory="", description=""}
vim.fn.setreg("*", emoji.value)
print([[Press p or "*p to paste this emoji]] .. emoji.value)
-- insert emoji when picked
vim.api.nvim_put({ emoji.value }, 'c', false, true)
end,
}
} }
} }
require('telescope').load_extension('undo') require('telescope').load_extension('undo')
require('telescope').load_extension('menufacture') require('telescope').load_extension('menufacture')
require("telescope").load_extension("emoji")
require("telescope").load_extension("git_file_history") require("telescope").load_extension("git_file_history")
local def = { noremap = true, silent = true } local def = { noremap = true, silent = true }
local map = vim.keymap.set local map = vim.keymap.set

View File

@@ -1,4 +1,7 @@
return { return {
'folke/trouble.nvim', 'folke/trouble.nvim',
dependencies = {
'kyazdani42/nvim-web-devicons',
},
config = true, config = true,
} }

View File

@@ -18,7 +18,7 @@ return {
require("cmake-tools").setup { require("cmake-tools").setup {
cmake_command = "cmake", cmake_command = "cmake",
ctest_command = "ctest", ctest_command = "ctest --verbose",
cmake_generate_options = { "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" }, cmake_generate_options = { "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" },
cmake_build_options = { "-j15" }, cmake_build_options = { "-j15" },
cmake_build_directory = "build", cmake_build_directory = "build",
@@ -38,7 +38,7 @@ return {
console = "integratedTerminal", console = "integratedTerminal",
}, },
cmake_executor = { -- executor to use cmake_executor = { -- executor to use
name = "toggleterm", -- name of the executor name = "quickfix", -- name of the executor
opts = {}, -- the options the executor will get, possible values depend on the executor type. See `default_opts` for possible values. opts = {}, -- the options the executor will get, possible values depend on the executor type. See `default_opts` for possible values.
default_opts = { -- a list of default and possible values for executors default_opts = { -- a list of default and possible values for executors
quickfix = { quickfix = {
@@ -87,7 +87,7 @@ return {
}, },
}, },
cmake_runner = { -- runner to use cmake_runner = { -- runner to use
name = "toggleterm", -- name of the runner name = "quickfix", -- name of the runner
opts = {}, -- the options the runner will get, possible values depend on the runner type. See `default_opts` for possible values. opts = {}, -- the options the runner will get, possible values depend on the runner type. See `default_opts` for possible values.
default_opts = { -- a list of default and possible values for runners default_opts = { -- a list of default and possible values for runners
quickfix = { quickfix = {
@@ -105,7 +105,7 @@ return {
overseer = { overseer = {
new_task_opts = { new_task_opts = {
strategy = { strategy = {
"toggleterm", "quickfix",
direction = "horizontal", direction = "horizontal",
autos_croll = true, autos_croll = true,
quit_on_exit = "success" quit_on_exit = "success"