Skip to content

Commit 2a7f0e4

Browse files
committed
add : namu
1 parent 42ad037 commit 2a7f0e4

6 files changed

Lines changed: 39 additions & 5 deletions

File tree

ftplugin/java.lua

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,15 @@ local config = {
6464
}
6565
require("jdtls").start_or_attach(config)
6666

67-
vim.keymap.set("n", "<leader>ji", "<Cmd>lua require'jdtls'.organize_imports()<CR>", { desc = " organize imports" })
67+
vim.keymap.set(
68+
"n",
69+
"<leader>ji",
70+
"<Cmd>lua require'jdtls'.organize_imports()<CR>",
71+
{ desc = "<U+F03A> organize imports" }
72+
)
73+
-- Note: <leader>ji for organize imports is now handled globally in keymaps.lua
74+
-- The global handler automatically uses jdtls.organize_imports() for Java files
75+
6876
--vim.keymap.set('n', '<leader>crv', "<Cmd>lua require('jdtls').extract_variable()<CR>", { desc = 'Extract Variable' })
6977
--vim.keymap.set('v', '<leader>crv', "<Esc><Cmd>lua require('jdtls').extract_variable(true)<CR>", { desc = 'Extract Variable' })
7078
--vim.keymap.set('n', '<leader>crc', "<Cmd>lua require('jdtls').extract_constant()<CR>", { desc = 'Extract Constant' })

init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ require("lazy").setup({
7171
require("plugins.chatbot"),
7272
require("plugins.rovo-dev"),
7373
-- require("plugins.smooth_scroll"),
74+
require("plugins.namu"),
7475

7576
ui = {
7677
-- If you are using a Nerd Font: set icons to an empty table which will use the

lazy-lock.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"mdx.nvim": { "branch": "main", "commit": "30222997ed4c0c7cc7447c4fce360fce87101bbf" },
3333
"mini.nvim": { "branch": "main", "commit": "9b935c218ddba02e5dc75c94f90143bce1f7c646" },
3434
"minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" },
35+
"namu.nvim": { "branch": "main", "commit": "fb13c050f3f4f812ca954caf60da48afdd274e1d" },
3536
"neo-tree.nvim": { "branch": "main", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
3637
"neovim": { "branch": "main", "commit": "cf2a288696b03d0934da713d66c6d71557b5c997" },
3738
"nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" },

lua/core/keymaps.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ vim.keymap.set("i", "<C-z>", "<C-o>u", { noremap = true, silent = true })
1414
vim.keymap.set("n", "gl", function()
1515
vim.diagnostic.open_float()
1616
end, {
17-
desc = " view diagnostics (line)",
17+
desc = " view diagnostics (line)",
1818
})
1919

2020
--select all in normal mode;
@@ -50,6 +50,7 @@ vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "Move focus to the left wind
5050
vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "Move focus to the right window" })
5151
vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Move focus to the lower window" })
5252
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Move focus to the upper window" })
53+
vim.keymap.set("n", "<leader>e", "<cmd>Neotree toggle<CR>", { desc = "Toggle Neo-tree" })
5354

5455
-- my cpp related stuffs;
5556
-- used to replace the copied test case to input.txt;
@@ -68,7 +69,7 @@ vim.keymap.set("n", "<leader>jr", function()
6869
local script = file_dir .. "/run_java.sh"
6970
vim.cmd("terminal bash " .. script)
7071
end, {
71-
desc = " run Java program",
72+
desc = " run Java program",
7273
})
7374

7475
-- to run the cpp code and display the output along with dbg file;
@@ -77,5 +78,5 @@ vim.keymap.set("n", "<leader>jf", function()
7778
local script = file_dir .. "/run_cpp.sh"
7879
vim.cmd("terminal bash " .. script)
7980
end, {
80-
desc = " run C++ program",
81+
desc = " run C++ program",
8182
})

lua/core/options.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ vim.opt.number = false
1010
vim.g.have_nerd_font = true
1111
vim.opt.mouse = "a"
1212
vim.opt.showmode = false
13-
13+
vim.opt.termguicolors = true
1414
-- For Menus
1515
--
1616
vim.opt.mouse = "a"

lua/plugins/namu.lua

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
return {
2+
"bassamsdata/namu.nvim",
3+
opts = {
4+
global = {},
5+
namu_symbols = { -- Specific Module options
6+
options = {},
7+
},
8+
},
9+
-- === Suggested Keymaps: ===
10+
vim.keymap.set("n", "<leader>ns", ":Namu symbols<cr>", {
11+
desc = "Jump to LSP symbol",
12+
silent = true,
13+
}),
14+
vim.keymap.set("n", "<leader>nw", ":Namu workspace<cr>", {
15+
desc = "LSP Symbols - Workspace",
16+
silent = true,
17+
}),
18+
19+
vim.keymap.set("n", "<leader>nt", ":Namu watchtower<cr>", {
20+
desc = "Tree",
21+
silent = true,
22+
}),
23+
}

0 commit comments

Comments
 (0)