Compare commits
11 Commits
76da790a27
...
d347569e2f
Author | SHA1 | Date | |
---|---|---|---|
d347569e2f | |||
64a0f6da0c | |||
5ecbea59dc | |||
9643ae8259 | |||
f4f77c3358 | |||
0745f9b329 | |||
17f45981ed | |||
8e0048f55e | |||
80ecc47399 | |||
|
d0c602f5f1 | ||
|
6db16815ac |
10
init.lua
10
init.lua
@ -35,3 +35,13 @@ require "nvchad.autocmds"
|
|||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
require "mappings"
|
require "mappings"
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
------added------------
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "sql",
|
||||||
|
callback = function()
|
||||||
|
vim.bo.commentstring = "-- %s"
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.opt.conceallevel = 1 -- or 0, or 2, depending on your preference
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
-- This file needs to have same structure as nvconfig.lua
|
-- This file needs to have same structure as nvconfig.lua
|
||||||
-- https://github.com/NvChad/ui/blob/v2.5/lua/nvconfig.lua
|
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
|
||||||
-- Please read that file to know all available options :(
|
-- Please read that file to know all available options :(
|
||||||
|
|
||||||
---@type ChadrcConfig
|
---@type ChadrcConfig
|
||||||
|
13
lua/custom_telescope.lua
Normal file
13
lua/custom_telescope.lua
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
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,49 @@ map("n", ";", ":", { desc = "CMD enter command mode" })
|
|||||||
map("i", "jk", "<ESC>")
|
map("i", "jk", "<ESC>")
|
||||||
|
|
||||||
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
|
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
|
||||||
|
|
||||||
|
-- local custom_telescope = require('custom_telescope')
|
||||||
|
|
||||||
|
-- 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 })
|
||||||
|
-- Add a keybinding for calling ObsidianLink
|
||||||
|
vim.api.nvim_set_keymap('v', '<leader>fl', ':ObsidianLink<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,43 @@ require "nvchad.options"
|
|||||||
|
|
||||||
-- local o = vim.o
|
-- local o = vim.o
|
||||||
-- o.cursorlineopt ='both' -- to enable cursorline!
|
-- o.cursorlineopt ='both' -- to enable cursorline!
|
||||||
|
require('telescope').setup{
|
||||||
|
defaults = {
|
||||||
|
layout_config = {
|
||||||
|
prompt_position = "top"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
require('nvim-tree').setup{
|
||||||
|
filters = { dotfiles = false },
|
||||||
|
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 = "" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
@ -13,6 +13,18 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
requires = { {'nvim-lua/plenary.nvim'} },
|
||||||
|
config = function()
|
||||||
|
require('telescope').setup {
|
||||||
|
defaults = {
|
||||||
|
-- Your default configuration for Telescope (optional)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
-- {
|
-- {
|
||||||
-- "nvim-treesitter/nvim-treesitter",
|
-- "nvim-treesitter/nvim-treesitter",
|
||||||
-- opts = {
|
-- opts = {
|
||||||
|
30
lua/plugins/obsidian.lua
Normal file
30
lua/plugins/obsidian.lua
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
return {
|
||||||
|
"epwalsh/obsidian.nvim",
|
||||||
|
version = "*", -- recommended, use latest release instead of latest commit
|
||||||
|
lazy = true,
|
||||||
|
ft = "markdown",
|
||||||
|
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
|
||||||
|
-- event = {
|
||||||
|
-- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
|
||||||
|
-- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md"
|
||||||
|
-- -- refer to `:h file-pattern` for more examples
|
||||||
|
-- "BufReadPre path/to/my-vault/*.md",
|
||||||
|
-- "BufNewFile path/to/my-vault/*.md",
|
||||||
|
-- },
|
||||||
|
dependencies = {
|
||||||
|
-- Required.
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
|
||||||
|
-- see below for full list of optional dependencies 👇
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
workspaces = {
|
||||||
|
{
|
||||||
|
name = "work",
|
||||||
|
path = "//mnt/c/Users/ptrowbridge/hc_notes"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- see below for full list of options 👇
|
||||||
|
},
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user