Skip to content

Commit ddc433e

Browse files
specified ripgrep for certain telescope find functions, removed buffer-tab
1 parent 767a784 commit ddc433e

File tree

10 files changed

+159
-79
lines changed

10 files changed

+159
-79
lines changed

init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ vim.opt.conceallevel = 1
99
require('lazy-bootstrap')
1010

1111
require('lazy').setup({
12-
{ import = 'plugins/manifest' },
12+
{ import = 'plugin-manifest' },
1313
}, {
1414
defaults = {
1515
-- lazy = true

lazy-lock.json

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
"LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" },
44
"beacon.nvim": { "branch": "master", "commit": "a786c9a89b2c739c69f9500a2f70f2586c06ec27" },
55
"bufferline.nvim": { "branch": "main", "commit": "64e2c5def50dfd6b6f14d96a45fa3d815a4a1eef" },
6-
"catppuccin": { "branch": "main", "commit": "045e3499d9ec8d84635fb08877ae44fd33f6a38d" },
7-
"cmake-tools.nvim": { "branch": "master", "commit": "055d7bb37d5c4038ce1e400656b6504602934ce7" },
6+
"catppuccin": { "branch": "main", "commit": "aebe43db9cb26e1c70fc5b2fd4158169c405e720" },
7+
"cmake-tools.nvim": { "branch": "master", "commit": "a4cd0b3a2c8a166a54b36bc00579954426748959" },
88
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
99
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
1010
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
11-
"friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" },
12-
"gitsigns.nvim": { "branch": "main", "commit": "4e348641b8206c3b8d23080999e3ddbe4ca90efc" },
11+
"friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" },
12+
"gitsigns.nvim": { "branch": "main", "commit": "70584ff9aae8078b64430c574079d79620b8f06d" },
1313
"glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" },
1414
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" },
15+
<<<<<<< HEAD
1516
"lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" },
1617
"lualine.nvim": { "branch": "master", "commit": "af4c3cf17206810880d2a93562e0a4c0d901c684" },
1718
"mason-lspconfig.nvim": { "branch": "main", "commit": "82c7cb08ddb836ad938b2708e50085f12a8825d2" },
@@ -30,14 +31,37 @@
3031
"nvim-web-devicons": { "branch": "master", "commit": "cb0c967c9723a76ccb1be0cc3a9a10e577d2f6ec" },
3132
"plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" },
3233
"rainbow-delimiters.nvim": { "branch": "master", "commit": "2200900e3c1aae21dadb65c2ea2e91bcc39ca368" },
34+
=======
35+
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
36+
"lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" },
37+
"mason-lspconfig.nvim": { "branch": "main", "commit": "9dfcf2036c223920826140f0151d929a43f9eceb" },
38+
"mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" },
39+
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
40+
"nabla.nvim": { "branch": "master", "commit": "27a6ea9ed7452bb9e0b19eb0942b5bcf7d051b2f" },
41+
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
42+
"neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" },
43+
"nvim-cmp": { "branch": "main", "commit": "2fb2a3cf78bbc1b0bea030e8c8728985af1cf302" },
44+
"nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" },
45+
"nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" },
46+
"nvim-lspconfig": { "branch": "master", "commit": "f4619ab31fc4676001ea05ae8200846e6e7700c7" },
47+
"nvim-nio": { "branch": "master", "commit": "33c62b3eadd8154169e42144de16ba4db6784bec" },
48+
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
49+
"nvim-tree.lua": { "branch": "master", "commit": "ddd1d6eb21c45433bdc65cc8015f2457998f2bf2" },
50+
"nvim-treesitter": { "branch": "master", "commit": "1d1d92e94aea9ac0273015341438b63d2db528a5" },
51+
"nvim-treesitter-textobjects": { "branch": "master", "commit": "d2a4ffc22d9d38d44edb73da007b3cf43451e9b4" },
52+
"nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" },
53+
"obsidian.nvim": { "branch": "main", "commit": "df0c5cce68a02481c0d40d1b25433e368fd12a5a" },
54+
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
55+
"rainbow-delimiters.nvim": { "branch": "master", "commit": "580bc045c7ab3ab3ebd267774038c0d8cc19c789" },
56+
>>>>>>> d666943 (specified ripgrep for certain telescope find functions, removed buffer-tab)
3357
"suda.vim": { "branch": "master", "commit": "66727b416837836712975e748bc8a19fb6cf4ec3" },
3458
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
3559
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
3660
"telescope.nvim": { "branch": "0.1.x", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
37-
"todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
38-
"tree-sitter-hyprlang": { "branch": "master", "commit": "fc1d331586e4da2b5f5bcfa89d630ebafe66458b" },
61+
"todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" },
62+
"tree-sitter-hyprlang": { "branch": "master", "commit": "e5da7d0aa44403153e0394d87d9edea4e5bd6609" },
3963
"vim-closer": { "branch": "master", "commit": "6007d9db0a35e983af246b667282606612076b07" },
40-
"vim-fugitive": { "branch": "master", "commit": "41beedabc7e948c787ea5696e04c3544c3674e23" },
64+
"vim-fugitive": { "branch": "master", "commit": "c0b03f1cac242d96837326d300f42a660306fc1a" },
4165
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" },
4266
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
4367
"vim-startify": { "branch": "master", "commit": "4e089dffdad46f3f5593f34362d530e8fe823dcf" },

lua/keymaps.lua

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
local map = vim.api.nvim_set_keymap
2+
local default_opts = { noremap = true }
13
local keymaps = {
24

35
map_basic = function()
@@ -43,17 +45,28 @@ local keymaps = {
4345

4446
local function telescope_live_grep_open_files()
4547
require('telescope.builtin').live_grep {
48+
find_command = 'rg',
4649
grep_open_files = true,
4750
prompt_title = 'Live Grep in Open Files',
4851
}
4952
end
53+
map('n', '<leader>s/',
54+
"<cmd> lua require('telescope.builtin').live_grep({ find_command = {'rg', '--files', '--hidden', '-g', '!.git' }})<cr>",
55+
{ noremap = true, desc = '[S]earch by [G]rep' })
56+
5057
vim.keymap.set('n', '<leader>s/', telescope_live_grep_open_files, { desc = '[S]earch [/] in Open Files' })
5158
vim.keymap.set('n', '<leader>ss', require('telescope.builtin').builtin, { desc = '[S]earch [S]elect Telescope' })
5259
vim.keymap.set('n', '<leader>gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' })
53-
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' })
60+
61+
map('n', '<leader>sf',
62+
"<cmd>lua require'telescope.builtin'.find_files({ find_command = {'rg', '--files', '--hidden', '-g', '!.git' }})<cr>",
63+
{ noremap = true, desc = '[S]earch [F]iles' })
64+
5465
vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' })
5566
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
56-
vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
67+
map('n', '<leader>sg',
68+
"<cmd> lua require('telescope.builtin').live_grep({ find_command = {'rg', '--files', '--hidden', '-g', '!.git' }})<cr>",
69+
{ noremap = true, desc = '[S]earch by [G]rep' })
5770
vim.keymap.set('n', '<leader>sG', ':LiveGrepGitRoot<cr>', { desc = '[S]earch by [G]rep on Git Root' })
5871
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
5972
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
@@ -92,7 +105,12 @@ local keymaps = {
92105
{ desc = 'Move to previous buffer on bufferline' })
93106
vim.keymap.set('n', '<leader>x', '<cmd>:bdelete<CR>',
94107
{ desc = 'Close current buffer' })
95-
end
108+
end,
109+
110+
map_naba = function()
111+
vim.keymap.set('n', '<leader>k', require('nabla').popup,
112+
{ desc = 'Hover Latex' })
113+
end,
96114
}
97115

98116
return keymaps

lua/lsp-cfg.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ local servers = {
112112
ltex = {
113113
language = "en-US",
114114
checkFrequency = "edit",
115-
languageToolHttpServerUri = "https://api.languagetoolplus.com",
115+
languageToolHttpServerUri = "https://api.languagetoolplus.com/",
116116
languageToolOrg = {
117117
username = "[email protected]",
118118
apiKey = "pit-CkBrXozbo2c5"

lua/plugin-manifest.lua

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
-- You can add your own plugins here or in other files in this directory!
2+
-- I promise not to create any merge conflicts in this directory :)
3+
--
4+
-- See the kickstart.nvim README for more information
5+
return {
6+
-- Base Plugins
7+
require('plugins/telescope'),
8+
require('plugins/treesitter'),
9+
require('plugins/lsp'),
10+
require('plugins/debug'),
11+
require('plugins/autoformat'),
12+
require('plugins/git'),
13+
require('plugins/status-line'),
14+
require('plugins/theme'),
15+
require('plugins/sleuth'),
16+
require('plugins/wh-key'),
17+
require('plugins/indent-blankline'),
18+
require('plugins/comment'),
19+
-- Additional Plugins
20+
require('plugins/obsidian'),
21+
require('plugins/notify'),
22+
require('plugins/start-screen'),
23+
-- require('plugins/noice'), -- causing fidget to still exist
24+
require('plugins/file-tree'),
25+
-- require('plugins/tab-line'),
26+
require('plugins/glow'),
27+
require('plugins/comments'),
28+
require('plugins/beacon'),
29+
require('plugins/neogen'),
30+
require('plugins/brackets'),
31+
-- require('plugins/copilot'),
32+
require('plugins/cmake-tools'),
33+
require('plugins/suda'),
34+
require('plugins.nabla'),
35+
}

lua/plugins/debug.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ return {
1515
-- Creates a beautiful debugger UI
1616
'rcarriga/nvim-dap-ui',
1717

18+
'nvim-neotest/nvim-nio',
19+
1820
-- Installs the debug adapters for you
1921
'williamboman/mason.nvim',
2022
'jay-babu/mason-nvim-dap.nvim',

lua/plugins/glow.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
return { "ellisonleao/glow.nvim", config = true, cmd = "Glow" }
1+
return {
2+
"ellisonleao/glow.nvim",
3+
ft = 'markdown',
4+
config = true,
5+
cmd = "Glow"
6+
}

lua/plugins/manifest.lua

Lines changed: 0 additions & 34 deletions
This file was deleted.

lua/plugins/nabla.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
return {
2+
"jbyuki/nabla.nvim",
3+
ft = { 'markdown', 'latex' },
4+
config = function()
5+
require('keymaps').map_naba()
6+
end
7+
}

lua/plugins/obsidian.lua

Lines changed: 55 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ return {
22
"epwalsh/obsidian.nvim",
33
version = "*", -- recommended, use latest release instead of latest commit
44
lazy = true,
5-
ft = "markdown",
65
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
7-
-- event = {
8-
-- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
9-
-- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md"
10-
-- "BufReadPre path/to/my-vault/**.md",
11-
-- "BufNewFile path/to/my-vault/**.md",
12-
-- },
6+
event = {
7+
-- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
8+
-- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md"
9+
"BufReadPre " .. vim.fn.expand "~" .. "/Documents/Walker-Brain-Fork/**.md",
10+
"BufNewFile " .. vim.fn.expand "~" .. "/Documents/Walker-Brain-Fork/**.md",
11+
},
1312
dependencies = {
1413
-- Required.
1514
"nvim-lua/plenary.nvim",
@@ -20,40 +19,64 @@ return {
2019
workspaces = {
2120
{
2221
name = "personal",
23-
path = "~/Walker-Brain-Fork/",
22+
path = "~/Documents/Walker-Brain-Fork/",
2423
},
2524
},
26-
detect_cwd = true,
25+
26+
-- see below for full list of options 👇
27+
2728
-- Optional, completion of wiki links, local markdown links, and tags using nvim-cmp.
2829
completion = {
2930
-- Set to false to disable completion.
3031
nvim_cmp = true,
31-
3232
-- Trigger completion at 2 chars.
3333
min_chars = 2,
34-
35-
-- Where to put new notes created from completion. Valid options are
36-
-- * "current_dir" - put new notes in same directory as the current buffer.
37-
-- * "notes_subdir" - put new notes in the default notes subdirectory.
38-
new_notes_location = "current_dir",
39-
40-
-- Control how wiki links are completed with these (mutually exclusive) options:
41-
--
42-
-- 1. Whether to add the note ID during completion.
43-
-- E.g. "[[Foo" completes to "[[foo|Foo]]" assuming "foo" is the ID of the note.
44-
-- Mutually exclusive with 'prepend_note_path' and 'use_path_only'.
45-
prepend_note_id = true,
46-
-- 2. Whether to add the note path during completion.
47-
-- E.g. "[[Foo" completes to "[[notes/foo|Foo]]" assuming "notes/foo.md" is the path of the note.
48-
-- Mutually exclusive with 'prepend_note_id' and 'use_path_only'.
49-
prepend_note_path = false,
50-
-- 3. Whether to only use paths during completion.
51-
-- E.g. "[[Foo" completes to "[[notes/foo]]" assuming "notes/foo.md" is the path of the note.
52-
-- Mutually exclusive with 'prepend_note_id' and 'prepend_note_path'.
53-
use_path_only = false,
5434
},
55-
finder = "telescope.nvim",
5635

57-
-- see below for full list of options 👇
36+
37+
-- Optional, customize how note IDs are generated given an optional title.
38+
---@param title string|?
39+
---@return string
40+
note_id_func = function(title)
41+
-- Create note IDs in a Zettelkasten format with a timestamp and a suffix.
42+
-- In this case a note with the title 'My new note' will be given an ID that looks
43+
-- like '1657296016-my-new-note', and therefore the file name '1657296016-my-new-note.md'
44+
local suffix = ""
45+
if title ~= nil then
46+
-- If title is given, transform it into valid file name.
47+
suffix = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()
48+
else
49+
-- If title is nil, just add 4 random uppercase letters to the suffix.
50+
for _ = 1, 4 do
51+
suffix = suffix .. string.char(math.random(65, 90))
52+
end
53+
end
54+
return tostring(os.time()) .. "-" .. suffix
55+
end,
56+
57+
-- Optional, customize how note file names are generated given the ID, target directory, and title.
58+
---@param spec { id: string, dir: obsidian.Path, title: string|? }
59+
---@return string|obsidian.Path The full path to the new note.
60+
note_path_func = function(spec)
61+
-- This is equivalent to the default behavior.
62+
local path = spec.dir / tostring(spec.id)
63+
return path:with_suffix(".md")
64+
end,
65+
66+
-- Either 'wiki' or 'markdown'.
67+
preferred_link_style = "wiki",
68+
69+
picker = {
70+
-- Set your preferred picker. Can be one of 'telescope.nvim', 'fzf-lua', or 'mini.pick'.
71+
name = "telescope.nvim",
72+
-- Optional, configure key mappings for the picker. These are the defaults.
73+
-- Not all pickers support all mappings.
74+
mappings = {
75+
-- Create a new note from your query.
76+
new = "<C-x>",
77+
-- Insert a link to the selected note.
78+
insert_link = "<C-l>",
79+
},
80+
},
5881
},
5982
}

0 commit comments

Comments
 (0)