Compare commits
10 Commits
0c7d9cefa9
...
adc5ebe45f
Author | SHA1 | Date | |
---|---|---|---|
adc5ebe45f | |||
|
d0c602f5f1 | ||
|
6db16815ac | ||
|
76da790a27 | ||
|
0eb7d42b30 | ||
|
59f23d053a | ||
|
a4c2bbf43c | ||
|
cb60352466 | ||
|
3e1667ef3c | ||
|
935ea570af |
@ -3,3 +3,7 @@
|
||||
- The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo.
|
||||
- So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"`
|
||||
- So you can delete the .git from this repo ( when you clone it locally ) or fork it :)
|
||||
|
||||
# Credits
|
||||
|
||||
1) Lazyvim starter https://github.com/LazyVim/starter as nvchad's starter was inspired by Lazyvim's . It made a lot of things easier!
|
||||
|
4
init.lua
4
init.lua
@ -1,10 +1,10 @@
|
||||
vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/"
|
||||
vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/"
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- bootstrap lazy and all plugins
|
||||
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
||||
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
if not vim.uv.fs_stat(lazypath) then
|
||||
local repo = "https://github.com/folke/lazy.nvim.git"
|
||||
vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath }
|
||||
end
|
||||
|
@ -1,11 +1,12 @@
|
||||
-- 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 :(
|
||||
|
||||
---@type ChadrcConfig
|
||||
local M = {}
|
||||
|
||||
M.base46 = {
|
||||
theme = "onedark",
|
||||
theme = "dark_horizon",
|
||||
|
||||
-- hl_override = {
|
||||
-- Comment = { italic = true },
|
||||
|
@ -17,7 +17,7 @@ for _, lsp in ipairs(servers) do
|
||||
end
|
||||
|
||||
-- configuring single server, example: typescript
|
||||
-- lspconfig.tsserver.setup {
|
||||
-- lspconfig.ts_ls.setup {
|
||||
-- on_attach = nvlsp.on_attach,
|
||||
-- on_init = nvlsp.on_init,
|
||||
-- capabilities = nvlsp.capabilities,
|
||||
|
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