First config
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
lazy-lock.json
|
||||||
12
init.lua
Normal file
12
init.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
require("config.lazy")
|
||||||
|
|
||||||
|
vim.opt.mouse = ''
|
||||||
|
|
||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
vim.opt.rnu = true
|
||||||
|
|
||||||
|
vim.cmd("syntax on")
|
||||||
|
|
||||||
|
vim.keymap.set('n', 'p', '<Cmd>pu<CR>')
|
||||||
|
|
||||||
35
lua/config/lazy.lua
Normal file
35
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 },
|
||||||
|
})
|
||||||
10
lua/plugins/colorscheme.lua
Normal file
10
lua/plugins/colorscheme.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"Mofiqul/dracula.nvim",
|
||||||
|
lazy = false, -- make sure we load this during startup if it is your main colorscheme
|
||||||
|
priority = 1000, -- make sure to load this before all the other start plugins
|
||||||
|
config = function()
|
||||||
|
vim.cmd([[colorscheme dracula]])
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
7
lua/plugins/marks.lua
Normal file
7
lua/plugins/marks.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"chentoast/marks.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
22
lua/plugins/treesitter.lua
Normal file
22
lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
local opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
'c',
|
||||||
|
'lua',
|
||||||
|
'vim',
|
||||||
|
'vimdoc',
|
||||||
|
'query',
|
||||||
|
'markdown',
|
||||||
|
'markdown_inline',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local function config()
|
||||||
|
require('nvim-treesitter.configs').setup(opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
config = config,
|
||||||
|
build = ':TSUpdate'
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user