save
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
vim.opt_local.shiftwidth = 8
|
||||
vim.opt_local.expandtab = false
|
||||
vim.opt_local.formatoptions:remove "o"
|
||||
|
||||
vim.diagnostic.config { virtual_text = false, underline = false, signs = false }
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
---@type vim.lsp.Config
|
||||
return {
|
||||
cmd = { 'bash-language-server', 'start' },
|
||||
settings = {
|
||||
bashIde = {
|
||||
globPattern = vim.env.GLOB_PATTERN or '*@(.sh|.inc|.bash|.command)',
|
||||
},
|
||||
},
|
||||
filetypes = { 'bash', 'sh', 'zsh' },
|
||||
root_markers = { '.git' },
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
---@type vim.lsp.Config
|
||||
return {
|
||||
cmd = { 'pyright-langserver', '--stdio' },
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
typeCheckingMode = 'basic',
|
||||
autoSearchPaths = true,
|
||||
useLibraryCodeForTypes = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
filetypes = { 'python' },
|
||||
root_markers = { 'pyproject.toml', 'setup.py', 'requirements.txt', '.git' },
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
---@type vim.lsp.Config
|
||||
return {
|
||||
cmd = { 'rust-analyzer' },
|
||||
filetypes = { 'rs' },
|
||||
root_markers = { 'Cargo.toml' },
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
---@type vim.lsp.Config
|
||||
return {
|
||||
cmd = { 'tinymist' },
|
||||
filetypes = { 'typ' },
|
||||
root_markers = { 'main.typ', 'typst.toml' },
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
---@type vim.lsp.Config
|
||||
return {
|
||||
cmd = { 'zls' },
|
||||
filetypes = { 'zig' },
|
||||
root_markers = { '.git', 'build.zig' },
|
||||
}
|
||||
@@ -8,13 +8,3 @@ opt.splitright = true
|
||||
opt.splitbelow = true
|
||||
|
||||
vim.cmd.colorscheme("gruber-darker")
|
||||
|
||||
if vim.g.neovide then
|
||||
vim.o.guifont = "ComicShannsMono Nerd Font"
|
||||
|
||||
local function copy() vim.cmd([[normal! "+y]]) end
|
||||
local function paste() vim.api.nvim_paste(vim.fn.getreg("+"), true, -1) end
|
||||
|
||||
vim.keymap.set("v", "<S-C-c>", copy, { silent = true })
|
||||
vim.keymap.set({ "n", "i", "v", "c", "t" }, "<S-C-v>", paste)
|
||||
end
|
||||
|
||||
@@ -8,13 +8,13 @@ keymap("v", "K", ":m '<-2<CR>gv=gv")
|
||||
keymap("c", "<C-j>", "<down>")
|
||||
keymap("c", "<C-k>", "<up>")
|
||||
|
||||
keymap("n", "-", ":Dired<CR>")
|
||||
keymap("n", "-", ":Ex<CR>")
|
||||
|
||||
for _, k in ipairs({ "h", "j", "k", "l" }) do
|
||||
keymap({ "n", "i", "v" }, "<C-" .. k .. ">", "<C-w><C-" .. k .. ">")
|
||||
end
|
||||
|
||||
keymap({ "n", "t" }, "<C-/>", function()
|
||||
keymap({ "n", "t" }, "<C-_>", function()
|
||||
require("snacks").terminal()
|
||||
end)
|
||||
|
||||
@@ -26,29 +26,6 @@ keymap("n", "<leader>eo", ":edit ~/dotfiles/oxwm/.config/oxwm/config.lua<CR>")
|
||||
keymap("n", "<leader><leader>", ":Pick files<CR>")
|
||||
keymap("n", "<leader>f", ":Pick grep_live<CR>")
|
||||
|
||||
-- Project
|
||||
keymap("n", "<leader>p", function()
|
||||
local root = vim.fn.expand("~/programming")
|
||||
local items = vim.fn.globpath(root, "*", false, true)
|
||||
local dirs = {}
|
||||
for _, p in ipairs(items) do
|
||||
if vim.fn.isdirectory(p) == 1 then table.insert(dirs, p) end
|
||||
end
|
||||
if #dirs == 0 then
|
||||
vim.notify("No directories in " .. root, vim.log.levels.INFO)
|
||||
return
|
||||
end
|
||||
vim.ui.select(dirs, { prompt = "Pick dir:" }, function(choice)
|
||||
if not choice then return end
|
||||
local escapedChoice = vim.fn.fnameescape(choice)
|
||||
vim.cmd("cd " .. escapedChoice)
|
||||
vim.cmd("Explore " .. escapedChoice)
|
||||
vim.notify("cd -> " .. choice, vim.log.levels.INFO)
|
||||
end)
|
||||
end)
|
||||
|
||||
keymap("n", "<leader>g", ":Neogit<CR>")
|
||||
|
||||
-- Language
|
||||
keymap("n", "<leader>lf", vim.lsp.buf.format)
|
||||
keymap("n", "<leader>la", vim.lsp.buf.code_action)
|
||||
|
||||
@@ -3,8 +3,6 @@ vim.lsp.enable {
|
||||
"lua_ls",
|
||||
"clangd",
|
||||
"jdtls",
|
||||
"bashls",
|
||||
"zls",
|
||||
}
|
||||
|
||||
vim.diagnostic.config { virtual_text = true, underline = true, signs = false }
|
||||
|
||||
@@ -5,43 +5,13 @@ vim.pack.add {
|
||||
{ src = "https://github.com/rafamadriz/friendly-snippets" },
|
||||
{ src = "https://github.com/saghen/blink.cmp" },
|
||||
{ src = "https://github.com/nvim-lualine/lualine.nvim" },
|
||||
{ src = "https://github.com/sphamba/smear-cursor.nvim" },
|
||||
{ src = "https://github.com/m00qek/baleia.nvim" },
|
||||
{ src = "https://github.com/esmuellert/codediff.nvim" },
|
||||
{ src = "https://github.com/NeogitOrg/neogit" },
|
||||
{ src = "https://github.com/folke/snacks.nvim" },
|
||||
{ src = "https://github.com/saghen/blink.lib" },
|
||||
{ src = "https://github.com/blazkowolf/gruber-darker.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("lualine").setup {}
|
||||
require("neogit").setup {}
|
||||
require("render-markdown").setup {
|
||||
completions = { lsp = { enabled = true } }
|
||||
}
|
||||
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
|
||||
require("smear_cursor").setup {}
|
||||
end
|
||||
|
||||
require("snacks").setup {
|
||||
notifier = { enabled = true },
|
||||
|
||||
Reference in New Issue
Block a user