Compare commits
10 Commits
d0c602f5f1
...
abf67d31fc
| Author | SHA1 | Date | |
|---|---|---|---|
| abf67d31fc | |||
| 80a0176c65 | |||
| adc5ebe45f | |||
|
|
e3572e1f5e | ||
|
|
5c656910f0 | ||
|
|
925399d90c | ||
|
|
2b4293a4c1 | ||
|
|
85404dcb03 | ||
|
|
2ef0168470 | ||
|
|
c3d1fb646a |
@ -1,4 +1,4 @@
|
||||
**This repo is supposed to used as config by NvChad users!**
|
||||
**This repo is supposed to be used as config by NvChad users!**
|
||||
|
||||
- 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"`
|
||||
|
||||
2
init.lua
2
init.lua
@ -30,7 +30,7 @@ dofile(vim.g.base46_cache .. "defaults")
|
||||
dofile(vim.g.base46_cache .. "statusline")
|
||||
|
||||
require "options"
|
||||
require "nvchad.autocmds"
|
||||
require "autocmds"
|
||||
|
||||
vim.schedule(function()
|
||||
require "mappings"
|
||||
|
||||
29
lazy-lock.json
Normal file
29
lazy-lock.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "de10d8414235b0a8cabfeba60d07c24304e71f5c" },
|
||||
"NvChad": { "branch": "v2.5", "commit": "29ebe31ea6a4edf351968c76a93285e6e108ea08" },
|
||||
"base46": { "branch": "v2.5", "commit": "fde7a2cd54599e148d376f82980407c2d24b0fa2" },
|
||||
"cmp-async-path": { "branch": "main", "commit": "0ed1492f59e730c366d261a5ad822fa37e44c325" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "8270378ab83540b03d09c0194ba3e208f9d0cb72" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"mason.nvim": { "branch": "main", "commit": "9e25c98d4826998460926f8c5c2284848d80ae89" },
|
||||
"menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" },
|
||||
"minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "63a38440989c58e1f100373ab603fd24665bdc9a" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "9a05b9e9f928856ca23dbf876fab372003180c3f" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "3362099de3368aa620a8105b19ed04c2053e38c0" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"ui": { "branch": "v3.0", "commit": "dc4950f5bd4117e2da108b681506c908b93d4a62" },
|
||||
"volt": { "branch": "main", "commit": "7b8c5e790120d9f08c8487dcb80692db6d2087a1" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||
}
|
||||
1
lua/autocmds.lua
Normal file
1
lua/autocmds.lua
Normal file
@ -0,0 +1 @@
|
||||
require "nvchad.autocmds"
|
||||
@ -6,7 +6,7 @@
|
||||
local M = {}
|
||||
|
||||
M.base46 = {
|
||||
theme = "onedark",
|
||||
theme = "dark_horizon",
|
||||
|
||||
-- hl_override = {
|
||||
-- Comment = { italic = true },
|
||||
@ -14,4 +14,11 @@ M.base46 = {
|
||||
-- },
|
||||
}
|
||||
|
||||
-- M.nvdash = { load_on_startup = true }
|
||||
-- M.ui = {
|
||||
-- tabufline = {
|
||||
-- lazyload = false
|
||||
-- }
|
||||
-- }
|
||||
|
||||
return M
|
||||
|
||||
@ -1,24 +1,6 @@
|
||||
-- load defaults i.e lua_lsp
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
|
||||
local lspconfig = require "lspconfig"
|
||||
|
||||
-- EXAMPLE
|
||||
local servers = { "html", "cssls" }
|
||||
local nvlsp = require "nvchad.configs.lspconfig"
|
||||
vim.lsp.enable(servers)
|
||||
|
||||
-- lsps with default config
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
on_attach = nvlsp.on_attach,
|
||||
on_init = nvlsp.on_init,
|
||||
capabilities = nvlsp.capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
-- configuring single server, example: typescript
|
||||
-- lspconfig.ts_ls.setup {
|
||||
-- on_attach = nvlsp.on_attach,
|
||||
-- on_init = nvlsp.on_init,
|
||||
-- capabilities = nvlsp.capabilities,
|
||||
-- }
|
||||
-- read :h vim.lsp.config for changing options of lsp servers
|
||||
|
||||
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 = "" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -13,6 +13,9 @@ return {
|
||||
end,
|
||||
},
|
||||
|
||||
-- test new blink
|
||||
-- { import = "nvchad.blink.lazyspec" },
|
||||
|
||||
-- {
|
||||
-- "nvim-treesitter/nvim-treesitter",
|
||||
-- opts = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user