edits
This commit is contained in:
parent
d0c602f5f1
commit
adc5ebe45f
@ -6,7 +6,7 @@
|
||||
local M = {}
|
||||
|
||||
M.base46 = {
|
||||
theme = "onedark",
|
||||
theme = "dark_horizon",
|
||||
|
||||
-- hl_override = {
|
||||
-- Comment = { italic = true },
|
||||
|
14
lua/custom_telescope.lua
Normal file
14
lua/custom_telescope.lua
Normal file
@ -0,0 +1,14 @@
|
||||
local telescope = require('telescope.builtin')
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.search_markdown_tasks()
|
||||
telescope.grep_string({
|
||||
prompt_title = "Open Task List",
|
||||
search = "- [ ]", -- Customize if needed for specific task markers
|
||||
cwd = vim.fn.expand('%:p:h') -- Current file's directory
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
||||
|
@ -8,3 +8,45 @@ map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
map("i", "jk", "<ESC>")
|
||||
|
||||
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
|
||||
-- Add a keybinding for searching Markdown tasks
|
||||
vim.api.nvim_set_keymap('n', '<leader>mt', ':lua require("custom_telescope").search_markdown_tasks()<CR>', { noremap = true, silent = true })
|
||||
-- Add a keybinding for calling ObsidianTag
|
||||
vim.api.nvim_set_keymap('n', '<leader>tt', ':ObsidianTag<CR>', { noremap = true, silent = true })
|
||||
-- Add a keybinding for calling ObsidianBacklinks
|
||||
vim.api.nvim_set_keymap('n', '<leader>lb', ':ObsidianBacklinks<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Configure Telescope to scroll files with ctrl+j/k
|
||||
local actions = require('telescope.actions')
|
||||
-- local sorters = require('telescope.sorters')
|
||||
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-j>"] = actions.move_selection_next,
|
||||
["<C-k>"] = actions.move_selection_previous,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- make leader-e toggle the tree view as opposed to just setting focus
|
||||
vim.api.nvim_set_keymap('n', '<leader>e', ':NvimTreeToggle<CR>', {noremap = true, silent = true})
|
||||
|
||||
-- move the whole page without moving the cursor
|
||||
vim.api.nvim_set_keymap('n', 'J', '<C-e>', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', 'K', '<C-y>', { noremap = true })
|
||||
|
||||
-- Resize windows
|
||||
vim.api.nvim_set_keymap('n', '<Up>', '5<C-w>+', { silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<Down>', '5<C-w>-', { silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<Right>', '10<C-w>>', { silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<Left>', '10<C-w><', { silent = true })
|
||||
|
||||
-- Set the tab width to 4 spaces
|
||||
vim.cmd('set tabstop=4')
|
||||
vim.cmd('set shiftwidth=4')
|
||||
vim.cmd('set expandtab')
|
||||
|
||||
vim.o.hidden = true
|
||||
|
||||
|
@ -4,3 +4,52 @@ require "nvchad.options"
|
||||
|
||||
-- local o = vim.o
|
||||
-- o.cursorlineopt ='both' -- to enable cursorline!
|
||||
require('telescope').setup{
|
||||
defaults = {
|
||||
layout_config = {
|
||||
prompt_position = "top"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require('nvim-tree').setup{
|
||||
filters = {
|
||||
enable = true,
|
||||
git_ignored = false,
|
||||
dotfiles = false,
|
||||
git_clean = false,
|
||||
no_buffer = false,
|
||||
no_bookmark = false,
|
||||
custom = {},
|
||||
exclude = {},
|
||||
},
|
||||
disable_netrw = true,
|
||||
hijack_cursor = true,
|
||||
sync_root_with_cwd = true,
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
update_root = false,
|
||||
},
|
||||
view = {
|
||||
width = 30,
|
||||
preserve_window_proportions = true,
|
||||
},
|
||||
renderer = {
|
||||
root_folder_label = false,
|
||||
highlight_git = true,
|
||||
indent_markers = { enable = true },
|
||||
icons = {
|
||||
glyphs = {
|
||||
default = "",
|
||||
folder = {
|
||||
default = "",
|
||||
empty = "",
|
||||
empty_open = "",
|
||||
open = "",
|
||||
symlink = "",
|
||||
},
|
||||
git = { unmerged = "" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user