-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinit.lua
More file actions
78 lines (71 loc) · 2.08 KB
/
init.lua
File metadata and controls
78 lines (71 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
-- 1. Maintain your legacy Vim settings
vim.opt.runtimepath:prepend("~/.vim")
vim.opt.runtimepath:append("~/.vim/after")
vim.opt.packpath = vim.opt.runtimepath:get()
vim.cmd("source ~/.vimrc")
-- 2. Bootstrap lazy.nvim (automatically download it if missing)
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)
-- 3. Configure your plugins
-- This is where you list the plugins you want to install.
require("lazy").setup({
-- You can add Neovim-specific plugins here!
-- Take a look at these popular examples:
-- Fuzzy finder (Telescope)
{
'nvim-telescope/telescope.nvim', tag = '0.1.8',
dependencies = { 'nvim-lua/plenary.nvim' }
},
-- Better syntax highlighting (Treesitter)
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
},
-- Color scheme
{
"catppuccin/nvim",
name = "catppuccin",
priority = 1000, -- Load this first
},
{
"mfussenegger/nvim-lint",
event = { "BufReadPost", "BufWritePost", "InsertLeave" },
config = function()
local lint = require("lint")
-- 1. Assign Vale to your desired filetypes
lint.linters_by_ft = {
markdown = { "vale" },
text = { "vale" },
tex = { "vale" }, -- LaTeX support if you use it
}
-- 2. Create an autocmd to trigger linting automatically
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
group = lint_augroup,
callback = function()
lint.try_lint()
end,
})
end,
},
})