Compare commits
11 Commits
5cdf7648aa
...
master
Author | SHA1 | Date | |
---|---|---|---|
5fa42281f3 | |||
2448bc6494 | |||
9aec8eb028 | |||
9406f6d742 | |||
69e87e7d77 | |||
aa3f06a77f | |||
9e50fa629a | |||
0009f09e82 | |||
ae1e337895 | |||
947d04c265 | |||
3d987091c6 |
13
.luarc.json
Executable file
13
.luarc.json
Executable file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"runtime.version": "LuaJIT",
|
||||
"runtime.path": [
|
||||
"lua/?.lua",
|
||||
"lua/?/init.lua"
|
||||
],
|
||||
"diagnostics.globals": ["vim"],
|
||||
"workspace.checkThirdParty": false,
|
||||
"workspace.library": [
|
||||
"$VIMRUNTIME",
|
||||
"./lua"
|
||||
]
|
||||
}
|
@ -1,13 +1,44 @@
|
||||
local harpoon = require("harpoon")
|
||||
|
||||
-- REQUIRED
|
||||
harpoon:setup()
|
||||
harpoon:setup({})
|
||||
-- REQUIRED
|
||||
--
|
||||
-- basic telescope configuration
|
||||
local conf = require("telescope.config").values
|
||||
local function toggle_telescope(harpoon_files)
|
||||
local file_paths = {}
|
||||
for _, item in ipairs(harpoon_files.items) do
|
||||
table.insert(file_paths, item.value)
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>a", function() harpoon:list():append() end)
|
||||
vim.keymap.set("n", "<leader>h", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
require("telescope.pickers").new({}, {
|
||||
prompt_title = "Harpoon",
|
||||
finder = require("telescope.finders").new_table({
|
||||
results = file_paths,
|
||||
}),
|
||||
previewer = conf.file_previewer({}),
|
||||
sorter = conf.generic_sorter({}),
|
||||
}):find()
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>H", function() toggle_telescope(harpoon:list()) end,
|
||||
{ desc = "Open harpoon in telescope" })
|
||||
|
||||
|
||||
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end,
|
||||
{ desc = "Harpoon: Add current buffer" })
|
||||
vim.keymap.set("n", "<leader>hh", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end,
|
||||
{ desc = "Harpoon: Toggle quick menu" })
|
||||
|
||||
vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
|
||||
vim.keymap.set("n", "<C-j>", function() harpoon:list():select(2) end)
|
||||
vim.keymap.set("n", "<C-k>", function() harpoon:list():select(3) end)
|
||||
vim.keymap.set("n", "<C-l>", function() harpoon:list():select(4) end)
|
||||
|
||||
-- Toggle previous & next buffers stored within Harpoon list
|
||||
vim.keymap.set("n", "<leader>hp", function() harpoon:list():prev() end,
|
||||
{ desc = "Harpoon: Previous buffer" })
|
||||
vim.keymap.set("n", "<leader>hn", function() harpoon:list():next() end,
|
||||
{ desc = "Harpoon: Next buffer" })
|
||||
|
||||
|
@ -1,7 +0,0 @@
|
||||
-- Note keymaps
|
||||
vim.keymap.set("n", "<leader>ni", ":Neorg index<CR>")
|
||||
vim.keymap.set("n", "<leader>nr", ":Neorg return<CR>")
|
||||
vim.keymap.set("n", "<leader>nj", ":Neorg journal custom<CR>")
|
||||
|
||||
vim.keymap.set("n", "<leader>nim", ":Neorg inject-metadata<CR>")
|
||||
vim.keymap.set("n", "<leader>nis", ":Neorg inject-metadata<CR>")
|
@ -1,7 +1,7 @@
|
||||
-- finding files in working dir and repo
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<leader>pf', builtin.git_files, {})
|
||||
vim.keymap.set('n', '<leader>ps', function()
|
||||
builtin.grep_string({ search = vim.fn.input("Grep > ") });
|
||||
end)
|
||||
vim.keymap.set('n', '<leader>fp', builtin.git_files, {})
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||
|
@ -1,8 +1,8 @@
|
||||
-- parsing and highlighting
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
ensure_installed = { "python", "javascript", "typescript", "c", "rust", "bash", "lua", "vim", "vimdoc", "query" },
|
||||
|
||||
ensure_installed = 'all',
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
|
||||
@ -12,12 +12,10 @@ require'nvim-treesitter.configs'.setup {
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
|
||||
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
-- Needed because treesitter highlight turns off autoindent for php files
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
}
|
||||
|
@ -17,51 +17,39 @@ return {
|
||||
}
|
||||
},
|
||||
|
||||
{ "nvim-telescope/telescope.nvim", version = "0.1.x",
|
||||
{ "nvim-telescope/telescope.nvim",
|
||||
version = "0.1.x",
|
||||
dependencies = { "nvim-lua/plenary.nvim" }
|
||||
},
|
||||
|
||||
{ "ThePrimeagen/harpoon",
|
||||
version = "harpoon2",
|
||||
branch = "harpoon2",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
|
||||
{ "NeogitOrg/neogit",
|
||||
dependencies = { "nvim-lua/plenary.nvim" }
|
||||
branch = "master",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"sindrets/diffview.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
}
|
||||
},
|
||||
|
||||
{ "stevearc/oil.nvim" },
|
||||
|
||||
{ "nvim-neorg/neorg",
|
||||
version = "*",
|
||||
build = ":Neorg sync-parsers",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
require("neorg").setup {
|
||||
load = {
|
||||
["core.defaults"] = {}, -- Loads default behaviour
|
||||
["core.concealer"] = {}, -- Adds pretty icons to your documents
|
||||
["core.dirman"] = { -- Manages Neorg workspaces
|
||||
config = {
|
||||
workspaces = {
|
||||
notes = "~/Documents/Notes",
|
||||
},
|
||||
default_workspace = "notes",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
{ "stevearc/oil.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" }
|
||||
},
|
||||
|
||||
{ "kylechui/nvim-surround",
|
||||
version = "*",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("nvim-surround").setup()
|
||||
end
|
||||
},
|
||||
|
||||
{ "numToStr/Comment.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("Comment").setup()
|
||||
end
|
||||
@ -108,10 +96,12 @@ return {
|
||||
|
||||
-- lsp
|
||||
|
||||
{ "github/copilot.vim" },
|
||||
{
|
||||
"Exafunction/codeium.vim",
|
||||
event = "BufEnter"
|
||||
},
|
||||
|
||||
{"williamboman/mason.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("mason").setup({})
|
||||
end
|
||||
|
@ -22,3 +22,6 @@ vim.keymap.set("v", "<leader>y", "\"+y")
|
||||
vim.keymap.set("n", "<leader>Y", "\"+Y")
|
||||
|
||||
vim.keymap.set("n", "<F5>", ":make")
|
||||
|
||||
vim.keymap.set("n", "<leader>vs", ":vs #<CR>")
|
||||
vim.keymap.set("n", "<leader>sp", ":sp #<CR>")
|
||||
|
@ -3,6 +3,7 @@ vim.g.mapleader = " "
|
||||
vim.opt.nu = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.cursorline = true
|
||||
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
|
Reference in New Issue
Block a user