Compare commits

...

2 Commits

Author SHA1 Message Date
Robert Kmieć
6e13939c5b Nvim: minor cmake and telescope changes 2024-04-22 23:54:16 +02:00
Robert Kmieć
cd711ea4bf Nvim: add new note taking candidates 2024-04-22 23:52:55 +02:00
8 changed files with 52 additions and 46 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

@@ -1,25 +0,0 @@
return {
'tamton-aquib/zone.nvim',
opts = {
style = "treadmill",
after = 30, -- Idle timeout
exclude_filetypes = { "TelescopePrompt", "NvimTree", "neo-tree", "dashboard", "lazy" },
-- More options to come later
treadmill = {
direction = "left",
headache = true,
tick_time = 40, -- Lower, the faster
-- Opts for Treadmill style
},
epilepsy = {
stage = "aura", -- "aura" or "ictal"
tick_time = 100,
},
dvd = {
-- text = {"line1", "line2", "line3", "etc"}
tick_time = 100,
-- Opts for Dvd style
},
}
}

View File

@@ -0,0 +1,6 @@
return {
'2KAbhishek/tdo.nvim',
dependencies = { 'nvim-telescope/telescope.nvim' },
cmd = { 'Tdo', 'TdoEntry', 'TdoNote', 'TdoTodos', 'TdoToggle', 'TdoFind', 'TdoFiles' },
keys = { '[t', ']t' },
}

View File

@@ -0,0 +1,26 @@
return {
'renerocksai/telekasten.nvim',
dependencies = {
'renerocksai/calendar-vim'
},
config = function()
require('telekasten').setup({
home = vim.fn.expand("~/zettelkasten"),
})
-- Launch panel if nothing is typed after <leader>z
vim.keymap.set("n", "<leader>z", "<cmd>Telekasten panel<CR>")
-- Most used functions
vim.keymap.set("n", "<leader>zf", "<cmd>Telekasten find_notes<CR>")
vim.keymap.set("n", "<leader>zg", "<cmd>Telekasten search_notes<CR>")
vim.keymap.set("n", "<leader>zd", "<cmd>Telekasten goto_today<CR>")
vim.keymap.set("n", "<leader>zz", "<cmd>Telekasten follow_link<CR>")
vim.keymap.set("n", "<leader>zn", "<cmd>Telekasten new_note<CR>")
vim.keymap.set("n", "<leader>zc", "<cmd>Telekasten show_calendar<CR>")
vim.keymap.set("n", "<leader>zb", "<cmd>Telekasten show_backlinks<CR>")
vim.keymap.set("n", "<leader>zI", "<cmd>Telekasten insert_img_link<CR>")
-- Call insert link automatically when we start typing a link
vim.keymap.set("i", "[[", "<cmd>Telekasten insert_link<CR>")
end
}

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"