Compare commits
No commits in common. "d347569e2f283c164bad544724296b38d54a2075" and "76da790a27dbe470a9cb8d7e6e7c874fc0656cc7" have entirely different histories.
d347569e2f
...
76da790a27
10
init.lua
10
init.lua
@ -35,13 +35,3 @@ 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/v3.0/lua/nvconfig.lua
|
-- https://github.com/NvChad/ui/blob/v2.5/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
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
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,49 +8,3 @@ 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,43 +4,3 @@ 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,18 +13,6 @@ 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 = {
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
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