save
This commit is contained in:
6
nvim/.config/nvim/lsp/zls.lua
Normal file
6
nvim/.config/nvim/lsp/zls.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---@type vim.lsp.Config
|
||||||
|
return {
|
||||||
|
cmd = { 'zls' },
|
||||||
|
filetypes = { 'zig' },
|
||||||
|
root_markers = { '.git', 'build.zig' },
|
||||||
|
}
|
||||||
@@ -5,8 +5,10 @@ keymap("n", "<Esc>", ":nohlsearch<CR>")
|
|||||||
keymap("v", "J", ":m '>+1<CR>gv=gv")
|
keymap("v", "J", ":m '>+1<CR>gv=gv")
|
||||||
keymap("v", "K", ":m '<-2<CR>gv=gv")
|
keymap("v", "K", ":m '<-2<CR>gv=gv")
|
||||||
|
|
||||||
keymap('c', '<C-j>', '<down>')
|
keymap("c", "<C-j>", "<down>")
|
||||||
keymap('c', '<C-k>', '<up>')
|
keymap("c", "<C-k>", "<up>")
|
||||||
|
|
||||||
|
keymap("n", "-", ":Dired<CR>")
|
||||||
|
|
||||||
for _, k in ipairs({ "h", "j", "k", "l" }) do
|
for _, k in ipairs({ "h", "j", "k", "l" }) do
|
||||||
keymap({ "n", "i", "v" }, "<C-" .. k .. ">", "<C-w><C-" .. k .. ">")
|
keymap({ "n", "i", "v" }, "<C-" .. k .. ">", "<C-w><C-" .. k .. ">")
|
||||||
@@ -27,16 +29,16 @@ keymap("n", "<leader>f", ":Pick grep_live<CR>")
|
|||||||
-- Project
|
-- Project
|
||||||
keymap("n", "<leader>p", function()
|
keymap("n", "<leader>p", function()
|
||||||
local root = vim.fn.expand("~/programming")
|
local root = vim.fn.expand("~/programming")
|
||||||
local items = vim.fn.globpath(root, '*', false, true)
|
local items = vim.fn.globpath(root, "*", false, true)
|
||||||
local dirs = {}
|
local dirs = {}
|
||||||
for _, p in ipairs(items) do
|
for _, p in ipairs(items) do
|
||||||
if vim.fn.isdirectory(p) == 1 then table.insert(dirs, p) end
|
if vim.fn.isdirectory(p) == 1 then table.insert(dirs, p) end
|
||||||
end
|
end
|
||||||
if #dirs == 0 then
|
if #dirs == 0 then
|
||||||
vim.notify('No directories in ' .. root, vim.log.levels.INFO)
|
vim.notify("No directories in " .. root, vim.log.levels.INFO)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
vim.ui.select(dirs, { prompt = 'Pick dir:' }, function(choice)
|
vim.ui.select(dirs, { prompt = "Pick dir:" }, function(choice)
|
||||||
if not choice then return end
|
if not choice then return end
|
||||||
local escapedChoice = vim.fn.fnameescape(choice)
|
local escapedChoice = vim.fn.fnameescape(choice)
|
||||||
vim.cmd("cd " .. escapedChoice)
|
vim.cmd("cd " .. escapedChoice)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ vim.lsp.enable {
|
|||||||
"clangd",
|
"clangd",
|
||||||
"jdtls",
|
"jdtls",
|
||||||
"bashls",
|
"bashls",
|
||||||
|
"zls",
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.diagnostic.config { virtual_text = true, underline = true, signs = false }
|
vim.diagnostic.config { virtual_text = true, underline = true, signs = false }
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ vim.pack.add {
|
|||||||
{ src = "https://github.com/folke/snacks.nvim" },
|
{ src = "https://github.com/folke/snacks.nvim" },
|
||||||
{ src = "https://github.com/saghen/blink.lib" },
|
{ src = "https://github.com/saghen/blink.lib" },
|
||||||
{ src = "https://github.com/blazkowolf/gruber-darker.nvim" },
|
{ src = "https://github.com/blazkowolf/gruber-darker.nvim" },
|
||||||
{ src = "https://github.com/MeanderingProgrammer/render-markdown.nvim" }
|
{ src = "https://github.com/MeanderingProgrammer/render-markdown.nvim" },
|
||||||
|
|
||||||
|
{ src = "https://github.com/MunifTanjim/nui.nvim" },
|
||||||
|
{ src = "https://github.com/X3eRo0/dired.nvim" }
|
||||||
}
|
}
|
||||||
|
|
||||||
require("mini.pick").setup {}
|
require("mini.pick").setup {}
|
||||||
@@ -23,6 +26,19 @@ require("render-markdown").setup {
|
|||||||
}
|
}
|
||||||
require("render-markdown").enable()
|
require("render-markdown").enable()
|
||||||
|
|
||||||
|
require("dired").setup {
|
||||||
|
show_hidden = false,
|
||||||
|
show_icons = true,
|
||||||
|
|
||||||
|
keybinds = {
|
||||||
|
dired_mark = "<C-CR>"
|
||||||
|
},
|
||||||
|
|
||||||
|
colors = {
|
||||||
|
DiredMarkedFile = { link = {}, bg = "aa0000", fg = "NONE", gui = "bold" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if not vim.g.neovide then
|
if not vim.g.neovide then
|
||||||
require("smear_cursor").setup {}
|
require("smear_cursor").setup {}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -16,6 +16,10 @@
|
|||||||
"rev": "29b06f37251f2e010f53a0892573b2ec03d165e2",
|
"rev": "29b06f37251f2e010f53a0892573b2ec03d165e2",
|
||||||
"src": "https://github.com/esmuellert/codediff.nvim"
|
"src": "https://github.com/esmuellert/codediff.nvim"
|
||||||
},
|
},
|
||||||
|
"dired.nvim": {
|
||||||
|
"rev": "7cf5ceb69a6bbea547f97397fa5310b1571eb03a",
|
||||||
|
"src": "https://github.com/X3eRo0/dired.nvim"
|
||||||
|
},
|
||||||
"friendly-snippets": {
|
"friendly-snippets": {
|
||||||
"rev": "6cd7280adead7f586db6fccbd15d2cac7e2188b9",
|
"rev": "6cd7280adead7f586db6fccbd15d2cac7e2188b9",
|
||||||
"src": "https://github.com/rafamadriz/friendly-snippets"
|
"src": "https://github.com/rafamadriz/friendly-snippets"
|
||||||
@@ -40,6 +44,10 @@
|
|||||||
"rev": "99326a1310fb2d616b455d2fd16d01bf00682f06",
|
"rev": "99326a1310fb2d616b455d2fd16d01bf00682f06",
|
||||||
"src": "https://github.com/NeogitOrg/neogit"
|
"src": "https://github.com/NeogitOrg/neogit"
|
||||||
},
|
},
|
||||||
|
"nui.nvim": {
|
||||||
|
"rev": "de740991c12411b663994b2860f1a4fd0937c130",
|
||||||
|
"src": "https://github.com/MunifTanjim/nui.nvim"
|
||||||
|
},
|
||||||
"nvim-jdtls": {
|
"nvim-jdtls": {
|
||||||
"rev": "77ccaeb422f8c81b647605da5ddb4a7f725cda90",
|
"rev": "77ccaeb422f8c81b647605da5ddb4a7f725cda90",
|
||||||
"src": "https://codeberg.org/mfussenegger/nvim-jdtls"
|
"src": "https://codeberg.org/mfussenegger/nvim-jdtls"
|
||||||
|
|||||||
Reference in New Issue
Block a user