Add starter nvim dots
This commit is contained in:
parent
397a926937
commit
2f5659be0e
10
.config/nvim/init.lua
Normal file
10
.config/nvim/init.lua
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
-- Initialize lazy.nvim
|
||||||
|
require("config.lazy")
|
||||||
|
|
||||||
|
-- Set leader key
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = "\\"
|
||||||
|
|
||||||
|
-- Source other configuration files
|
||||||
|
require("keybindings")
|
||||||
|
require("settings")
|
||||||
6
.config/nvim/lazy-lock.json
Normal file
6
.config/nvim/lazy-lock.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }
|
||||||
|
}
|
||||||
35
.config/nvim/lua/config/lazy.lua
Normal file
35
.config/nvim/lua/config/lazy.lua
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
-- Bootstrap lazy.nvim
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
vim.api.nvim_echo({
|
||||||
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
|
{ out, "WarningMsg" },
|
||||||
|
{ "\nPress any key to exit..." },
|
||||||
|
}, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||||
|
-- loading lazy.nvim so that mappings are correct.
|
||||||
|
-- This is also a good place to setup other settings (vim.opt)
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = "\\"
|
||||||
|
|
||||||
|
-- Setup lazy.nvim
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
-- import your plugins
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
-- Configure any other settings here. See the documentation for more details.
|
||||||
|
-- colorscheme that will be used when installing plugins.
|
||||||
|
install = { colorscheme = { "habamax" } },
|
||||||
|
-- automatically check for plugin updates
|
||||||
|
checker = { enabled = true },
|
||||||
|
})
|
||||||
0
.config/nvim/lua/keybindings.lua
Normal file
0
.config/nvim/lua/keybindings.lua
Normal file
26
.config/nvim/lua/plugins/neo-tree.lua
Normal file
26
.config/nvim/lua/plugins/neo-tree.lua
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
return {
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
branch = "v2.x",
|
||||||
|
requires = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons", -- for file icons
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("neo-tree").setup({
|
||||||
|
filesystem = {
|
||||||
|
filtered_items = {
|
||||||
|
visible = true, -- Hide files and folders starting with a dot `.`
|
||||||
|
hide_dotfiles = false,
|
||||||
|
hide_gitignored = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
vim.api.nvim_set_keymap(
|
||||||
|
"n",
|
||||||
|
"<leader>e",
|
||||||
|
":Neotree toggle<CR>",
|
||||||
|
{ noremap = true, silent = true }
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
}
|
||||||
3
.config/nvim/lua/plugins/nui.lua
Normal file
3
.config/nvim/lua/plugins/nui.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
}
|
||||||
3
.config/nvim/lua/plugins/plenary.lua
Normal file
3
.config/nvim/lua/plugins/plenary.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
}
|
||||||
7
.config/nvim/lua/settings.lua
Normal file
7
.config/nvim/lua/settings.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
-- Set basic options
|
||||||
|
vim.o.number = true -- Show line numbers
|
||||||
|
vim.o.relativenumber = true -- Show relative line numbers
|
||||||
|
vim.o.tabstop = 4 -- Number of spaces tabs count for
|
||||||
|
vim.o.shiftwidth = 4 -- Number of spaces to use for each step of (auto)indent
|
||||||
|
vim.o.expandtab = true -- Convert tabs to spaces
|
||||||
|
vim.o.smartindent = true -- Insert indents automatically
|
||||||
Loading…
x
Reference in New Issue
Block a user