Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ Then, run `:Lazy` to install plugins.
- `<Space>;` opens command mode (`:`) - more comfortable than Shift+;
- `<Space>g` opens a popup window with recursive grep search in the current directory. Blazing fast ⚡ thanks to `ripgrep`
- `<Space>f` does the same but with file names using Telescope 🔥
- `<Space>t` opens a terminal in vertical split on the right already in insert mode. Ready to type commands 👨‍💻
- `<A-n>` opens a terminal in vertical split on the right already in insert mode. Ready to type commands 👨‍💻
- `<Space>n` opens neogit 🌳
- `<Space>o` opens file manager in a floating window 🛢️
- `<C-s>` shows git diff of the current line thanks to `gitsigns`
- `<C-\>` (un)comments either current line, or visually selected block of code 🔎
- `m` activates leap motion for quick navigation within visible text
- `m` activates leap motion for quick navigation within visible text (replaces built-in `m{a-z}` mark setting)

### 📖 Status Line

Expand Down
1 change: 0 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ require("mappings")
require("options")
require("autocommands")
require("config.lazy")
require("health")

if vim.fn.has("mac") == 1 then
require("config.mac")
Expand Down
2 changes: 1 addition & 1 deletion lua/autocommands.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
vim.api.nvim_set_hl(0, "YankHighlight", { bg = "#2d3f5f" })
vim.api.nvim_create_autocmd("TextYankPost", {
callback = function()
vim.highlight.on_yank { higroup = "YankHighlight", timeout = 250 }
vim.hl.on_yank { higroup = "YankHighlight", timeout = 250 }
end,
group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }),
pattern = "*",
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions lua/language-servers/lua-language-server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ vim.lsp.config("lua_ls", {
diagnostics = {
globals = { "vim" },
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false,
},
telemetry = { enable = false },
},
},
Expand Down
12 changes: 6 additions & 6 deletions lua/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ map("", "<CR>", "<Leader>", { remap = true })
map("n", "<leader>;", ":")
map("v", "<leader>;", ":")

-- easier than reaching for escape
map("i", "<A-n>", "<Esc>")
map("v", "<A-n>", "<Esc>")

-- navigate tabs
map("n", "<C-h>", "gT")
map("n", "<C-l>", "gt")
Expand All @@ -33,8 +29,12 @@ map("x", "<C-\\>", "gc", { remap = true })
map("n", "<leader>h", "<cmd>nohlsearch<CR>")

-- diagnostics
map("n", "[d", vim.diagnostic.goto_prev, { desc = "Go to previous [D]iagnostic message" })
map("n", "]d", vim.diagnostic.goto_next, { desc = "Go to next [D]iagnostic message" })
map("n", "[d", function()
vim.diagnostic.jump { count = -1, float = true }
end, { desc = "Go to previous [D]iagnostic message" })
map("n", "]d", function()
vim.diagnostic.jump { count = 1, float = true }
end, { desc = "Go to next [D]iagnostic message" })

-- toggle diff mode
local function toggle_diff()
Expand Down
2 changes: 1 addition & 1 deletion lua/plugins/claudecode.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
return {
"qwrtln/claudecode.nvim",
url = "git@github.com:qwrtln/claudecode.nvim.git",
dependencies = { "folke/snacks.nvim" },
config = true,
opts = {
Expand Down
34 changes: 0 additions & 34 deletions lua/plugins/claudecode.rs

This file was deleted.

44 changes: 16 additions & 28 deletions lua/plugins/cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@ vim.api.nvim_create_autocmd("FileType", {
end,
})

vim.api.nvim_create_autocmd("CmdlineEnter", {
callback = function()
require("cmp").setup { enabled = false }
end,
})

vim.api.nvim_create_autocmd("CmdlineLeave", {
callback = function()
require("cmp").setup { enabled = true }
end,
})

return {
"hrsh7th/nvim-cmp",
event = { "BufEnter", "BufReadPre", "BufNewFile" },
Expand Down Expand Up @@ -142,23 +130,22 @@ return {
},
sorting = {
priority_weight = 1.0,
comparators = {
compare.offset,
compare.exact,
compare.recently_used,
function(entry1, entry2) -- sort by compare kind (Variable, Function etc)
local kind1 = modified_kind(entry1:get_kind())
local kind2 = modified_kind(entry2:get_kind())
if kind1 ~= kind2 then
return kind1 - kind2 < 0
end
end,
compare.score,
require("cmp-under-comparator").under,
compare.kind,
},
},
comparators = {
compare.offset,
compare.exact,
compare.recently_used,
function(entry1, entry2) -- sort by compare kind (Variable, Function etc)
local kind1 = modified_kind(entry1:get_kind())
local kind2 = modified_kind(entry2:get_kind())
if kind1 ~= kind2 then
return kind1 - kind2 < 0
end
end,
compare.score,
require("cmp-under-comparator").under,
compare.kind,
},
min_length = 0, -- allow for `from package import _` in Python
mapping = cmp.mapping.preset.insert {
["<CR>"] = cmp.mapping.confirm { select = false }, -- do not select first item
["<C-e>"] = cmp.mapping.abort(),
Expand Down Expand Up @@ -198,6 +185,7 @@ return {

-- `:` cmdline setup.
cmp.setup.cmdline(":", {
completion = { keyword_length = 3 },
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = "path" },
Expand Down
2 changes: 1 addition & 1 deletion lua/plugins/indent-blankline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ return {
---@type ibl.config
opts = {
scope = {
highlight = "IndentBlanklineScpe",
highlight = "IndentBlanklineScope",
},
},
}
1 change: 1 addition & 0 deletions lua/plugins/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
vim.diagnostic.open_float(nil, {
border = "rounded",
focus = false,
scope = "cursor",
})
end,
})
Expand Down
1 change: 0 additions & 1 deletion lua/plugins/neoscroll.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ return {
"karb94/neoscroll.nvim",
opts = {
easing = "sine",
ignored_events = {},
},
}
2 changes: 1 addition & 1 deletion lua/plugins/telescope.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local map = vim.keymap.set
local projects_root_path = "~/Workspace"
local projects_root_path = vim.g.projects_root or "~/Workspace"

map("n", "<leader>f", "<cmd>Telescope find_files<CR>")
map("n", "<leader>g", "<cmd>Telescope live_grep<CR>")
Expand Down
2 changes: 1 addition & 1 deletion lua/plugins/tokyonight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ return {
highlight(0, "LineNrAbove", { fg = "#5a5a5a", bold = false })
highlight(0, "LineNr", { fg = "#71797E", bold = true })
highlight(0, "LineNrBelow", { fg = "#5a5a5a", bold = false })
highlight(0, "IndentBlanklineScpe", { fg = "#606060" })
highlight(0, "IndentBlanklineScope", { fg = "#606060" })
end,
}
16 changes: 0 additions & 16 deletions lua/plugins/treesitter-textobjects.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ return {
select("@function.inner", "textobjects")
end, { desc = "Select inside function" })

-- Classes
map({ "x", "o" }, "ac", function()
select("@class.outer", "textobjects")
end, { desc = "Select around class" })
map({ "x", "o" }, "ic", function()
select("@class.inner", "textobjects")
end, { desc = "Select inside class" })

-- Parameters
map({ "x", "o" }, "ap", function()
select("@parameter.outer", "textobjects")
Expand Down Expand Up @@ -129,14 +121,6 @@ return {
move.goto_previous_end("@class.outer", "textobjects")
end, { desc = "Previous class end" })

-- Jump to next/previous parameter
map({ "n", "x", "o" }, "]a", function()
move.goto_next_start("@parameter.inner", "textobjects")
end, { desc = "Next parameter" })
map({ "n", "x", "o" }, "[a", function()
move.goto_previous_start("@parameter.inner", "textobjects")
end, { desc = "Previous parameter" })

-- Jump to next/previous assignment
map({ "n", "x", "o" }, "]a", function()
move.goto_next_start("@assignment.outer", "textobjects")
Expand Down
Loading