new default nvim config based on LazyVim
This commit is contained in:
parent
f6f507c71a
commit
f6873678e2
|
@ -1,3 +1,20 @@
|
||||||
-- Keymaps are automatically loaded on the VeryLazy event
|
-- Keymaps are automatically loaded on the VeryLazy event
|
||||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||||
-- Add any additional keymaps here
|
-- Add any additional keymaps here
|
||||||
|
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||||
|
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "J", "mzJ`z")
|
||||||
|
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||||
|
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||||
|
vim.keymap.set("n", "n", "nzzzv")
|
||||||
|
vim.keymap.set("n", "N", "Nzzzv")
|
||||||
|
vim.keymap.set("n", "*", "*zzzv")
|
||||||
|
vim.keymap.set("n", "#", "#zzzv")
|
||||||
|
|
||||||
|
-- greatest remap ever
|
||||||
|
vim.keymap.set("x", "<leader>p", [["_dP]])
|
||||||
|
|
||||||
|
-- next greatest remap ever : asbjornHaland
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>y", [["+y]])
|
||||||
|
vim.keymap.set("n", "<leader>Y", [["+Y]])
|
||||||
|
|
|
@ -8,11 +8,11 @@ vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
-- add LazyVim and import its plugins
|
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
-- import any extras modules here
|
-- import any extras modules here
|
||||||
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
-- { import = "lazyvim.plugins.extras.lang.json" },
|
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
{ import = "lazyvim.plugins.extras.util.project" },
|
||||||
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||||
-- import/override with your plugins
|
-- import/override with your plugins
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
-- Options are automatically loaded before lazy.nvim startup
|
-- Options are automatically loaded before lazy.nvim startup
|
||||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
-- Add any additional options here
|
-- Add any additional options here
|
||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
vim.o.mouse = ""
|
||||||
|
vim.o.nu = true
|
||||||
|
vim.o.guicursor = ""
|
||||||
|
vim.o.cursorline = false
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
return {
|
||||||
|
{ "rcarriga/nvim-notify", enabled = false },
|
||||||
|
{ "folke/todo-comments.nvim", enabled = false },
|
||||||
|
-- this one is the command line popup
|
||||||
|
{ "folke/noice.nvim", enabled = false },
|
||||||
|
{ "indent-blankline.nvim", enabled = false },
|
||||||
|
{ "mini.indentscope", enabled = false },
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
-- dashboard
|
||||||
|
return {
|
||||||
|
"goolord/alpha-nvim",
|
||||||
|
event = "VimEnter",
|
||||||
|
opts = function()
|
||||||
|
local dashboard = require("alpha.themes.dashboard")
|
||||||
|
local logo = [[
|
||||||
|
██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
|
||||||
|
██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
|
||||||
|
██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z
|
||||||
|
██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z
|
||||||
|
███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
|
||||||
|
╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
||||||
|
|
||||||
|
[@ymoruhyi]
|
||||||
|
]]
|
||||||
|
|
||||||
|
dashboard.section.header.val = vim.split(logo, "\n")
|
||||||
|
end,
|
||||||
|
}
|
|
@ -0,0 +1,70 @@
|
||||||
|
-- return {
|
||||||
|
--
|
||||||
|
-- -- file explorer
|
||||||
|
-- {
|
||||||
|
-- "nvim-neo-tree/neo-tree.nvim",
|
||||||
|
-- cmd = "Neotree",
|
||||||
|
-- keys = {
|
||||||
|
-- {
|
||||||
|
-- "<leader>fe",
|
||||||
|
-- function()
|
||||||
|
-- require("neo-tree.command").execute({ toggle = true, dir = require("lazyvim.util").get_root() })
|
||||||
|
-- end,
|
||||||
|
-- desc = "Explorer NeoTree (root dir)",
|
||||||
|
-- },
|
||||||
|
-- {
|
||||||
|
-- "<leader>fE",
|
||||||
|
-- function()
|
||||||
|
-- require("neo-tree.command").execute({ toggle = true, dir = vim.loop.cwd() })
|
||||||
|
-- end,
|
||||||
|
-- desc = "Explorer NeoTree (cwd)",
|
||||||
|
-- },
|
||||||
|
-- { "<leader>e", "<leader>fe", desc = "Explorer NeoTree (root dir)", remap = true },
|
||||||
|
-- { "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
|
||||||
|
-- },
|
||||||
|
-- deactivate = function()
|
||||||
|
-- vim.cmd([[Neotree close]])
|
||||||
|
-- end,
|
||||||
|
-- init = function()
|
||||||
|
-- vim.g.neo_tree_remove_legacy_commands = 1
|
||||||
|
-- if vim.fn.argc() == 1 then
|
||||||
|
-- local stat = vim.loop.fs_stat(vim.fn.argv(0))
|
||||||
|
-- if stat and stat.type == "directory" then
|
||||||
|
-- require("neo-tree")
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- end,
|
||||||
|
-- opts = {
|
||||||
|
-- enable_git_status = false,
|
||||||
|
-- filesystem = {
|
||||||
|
-- bind_to_cwd = false,
|
||||||
|
-- follow_current_file = true,
|
||||||
|
-- use_libuv_file_watcher = true,
|
||||||
|
-- },
|
||||||
|
-- window = {
|
||||||
|
-- mappings = {
|
||||||
|
-- ["<space>"] = "none",
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- default_component_configs = {
|
||||||
|
-- indent = {
|
||||||
|
-- with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
||||||
|
-- expander_collapsed = "",
|
||||||
|
-- expander_expanded = "",
|
||||||
|
-- expander_highlight = "NeoTreeExpander",
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- config = function(_, opts)
|
||||||
|
-- require("neo-tree").setup(opts)
|
||||||
|
-- vim.api.nvim_create_autocmd("TermClose", {
|
||||||
|
-- pattern = "*lazygit",
|
||||||
|
-- callback = function()
|
||||||
|
-- if package.loaded["neo-tree.sources.git_status"] then
|
||||||
|
-- require("neo-tree.sources.git_status").refresh()
|
||||||
|
-- end
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
-- }
|
Loading…
Reference in New Issue