chore: Remove neovim clutter

This commit is contained in:
Fabio Lenherr / DashieTM 2023-11-18 00:17:06 +01:00
parent 61072b816a
commit 96e0da6deb
17 changed files with 111 additions and 794 deletions

View file

@ -142,6 +142,11 @@ require("neoscroll.config").set_mappings(t)
-- trouble
map("n", "<leader>t", "<cmd>TroubleToggle<CR>", term_opts)
-- format
map({ "n", "v" }, "<F4>", function()
Util.format({ force = true })
end, { desc = "Format" })
-- better yank
function Better_yank(opts)
local current_line = unpack(vim.api.nvim_win_get_cursor(0))

View file

@ -1,45 +1,47 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- bootstrap lazy.nvim
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable",
lazypath })
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.lang.rust" },
{ import = "lazyvim.plugins.extras.lang.java" },
{ import = "lazyvim.plugins.extras.lang.clangd" },
{ import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.python" },
{ import = "lazyvim.plugins.extras.lang.markdown" },
{ import = "lazyvim.plugins.extras.lang.cmake" },
{ import = "lazyvim.plugins.extras.lang.omnisharp" },
{ import = "lazyvim.plugins.extras.lang.tailwind" },
{ import = "lazyvim.plugins.extras.lang.json" },
{ import = "lazyvim.plugins.extras.util.dot" },
{ import = "lazyvim.plugins.extras.test.core" },
{ import = "lazyvim.plugins.extras.ui.alpha" },
{ import = "plugins.plugins" },
{ import = "lazyvim.plugins.extras.dap.core" },
{ import = "plugins" },
-- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.typescript" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins
{ import = "plugins.plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
lazy = true,
version = false,
},
install = { colorscheme = { "tokyonight", "catppuccin-mocha" } },
checker = { enabled = true, notify = false },
change_detection = { enabled = true, notify = false }, --know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
change_detection = { enabled = true, notify = false },
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",

View file

@ -15,7 +15,7 @@ function M.get()
{ "<leader>cl", "<cmd>LspInfo<cr>", desc = "Lsp Info" },
{ "<leader>ca", "<cmd>Telescope lsp_definitions<cr>", desc = "Goto Definition", has = "definition" },
{ "<leader>cs", "<cmd>Telescope lsp_references<cr>", desc = "References" },
{ "gD", vim.lsp.buf.declaration, desc = "Goto Declaration" },
{ "<leader>cA", vim.lsp.buf.declaration, desc = "Goto Declaration" },
{ "<leader>cf", "<cmd>Telescope lsp_implementations<cr>", desc = "Goto Implementation" },
{ "<leader>cd", "<cmd>Telescope lsp_type_definitions<cr>", desc = "Goto Type Definition" },
{ "<leader>ce", vim.lsp.buf.hover, desc = "Hover" },
@ -27,8 +27,8 @@ function M.get()
{ "[e", M.diagnostic_goto(false, "ERROR"), desc = "Prev Error" },
{ "]w", M.diagnostic_goto(true, "WARN"), desc = "Next Warning" },
{ "[w", M.diagnostic_goto(false, "WARN"), desc = "Prev Warning" },
{ "<F4>", format, desc = "Format Document", has = "formatting" },
-- { "<leader>cf", format, desc = "Format Range", mode = "v", has = "documentRangeFormatting" },
{ "<F4>", format, desc = "Format Range", mode = "v", has = "documentRangeFormatting" },
{ "<leader>cr", ":IncRename ", desc = "FUCK", has = "rename" },
{
"<leader>cq",
function()
@ -68,20 +68,6 @@ function M.get()
has = "codeAction",
},
}
if require("lazyvim.util").has("inc-rename.nvim") then
M._keys[#M._keys + 1] = {
"<leader>cr",
function()
require("inc_rename")
return ":IncRename " .. vim.fn.expand("<cword>")
end,
expr = true,
desc = "Rename",
has = "rename",
}
else
M._keys[#M._keys + 1] = { "<leader>cr", vim.lsp.buf.rename, desc = "Rename", has = "rename" }
end
end
return M._keys
end

View file

@ -20,6 +20,7 @@ vim.g.neovide_refresh_rate_idle = 5
vim.g.neovide_hide_mouse_when_typing = true
vim.g.mkdp_browser = "/usr/bin/firefox"
vim.g.mkdp_auto_start = 1
vim.g.autoformat = false
for k, v in pairs(options) do
vim.opt[k] = v
end