-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
104 lines (93 loc) · 3.24 KB
/
init.lua
File metadata and controls
104 lines (93 loc) · 3.24 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
vim.pack.add({
"https://github.com/MeanderingProgrammer/render-markdown.nvim",
"https://github.com/chrisgrieser/nvim-spider",
"https://github.com/folke/lazydev.nvim",
"https://github.com/folke/persistence.nvim",
"https://github.com/folke/snacks.nvim",
"https://github.com/folke/todo-comments.nvim",
"https://github.com/folke/trouble.nvim",
"https://github.com/folke/which-key.nvim",
"https://github.com/mfussenegger/nvim-jdtls",
"https://github.com/neovim/nvim-lspconfig",
"https://github.com/nvim-lua/plenary.nvim",
"https://github.com/nvim-lualine/lualine.nvim",
"https://github.com/nvim-mini/mini.ai",
"https://github.com/nvim-mini/mini.diff",
"https://github.com/nvim-mini/mini.files",
"https://github.com/nvim-mini/mini.icons",
"https://github.com/nvim-mini/mini.operators",
"https://github.com/nvim-mini/mini.pairs",
"https://github.com/nvim-mini/mini.surround",
-- TODO: Find alternative to nvim-treesitter
-- See <https://github.com/nvim-treesitter/nvim-treesitter/discussions/8627>
"https://github.com/nvim-treesitter/nvim-treesitter",
"https://github.com/nvim-treesitter/nvim-treesitter-context",
"https://github.com/nvim-treesitter/nvim-treesitter-textobjects",
"https://github.com/rachartier/tiny-inline-diagnostic.nvim",
"https://github.com/rafamadriz/friendly-snippets",
"https://github.com/rcarriga/nvim-notify",
"https://github.com/stevearc/conform.nvim",
"https://github.com/windwp/nvim-ts-autotag",
{ src = "https://github.com/catppuccin/nvim", name = "catppuccin" },
-- Stick to tagged releases which provide prebuilt binaries
{ src = "https://github.com/saghen/blink.cmp", version = vim.version.range("*") },
})
require("lazydev").setup()
require("mini.ai").setup()
require("mini.operators").setup()
require("mini.surround").setup({ silent = true })
require("nvim-ts-autotag").setup()
require("which-key").setup({
preset = "classic",
icons = { mappings = false },
})
vim.o.number = true
vim.o.relativenumber = true
vim.o.tabstop = 4
vim.o.shiftwidth = 0
-- Visible Whitespace
vim.o.list = true
-- TODO: Replace with `vim.o` once it supports tables
-- See <https://github.com/neovim/neovim/issues/20107>
vim.opt.listchars = {
tab = "──",
space = "⋅",
trail = "⋅",
}
-- Do not break long lines
vim.o.wrap = false
-- Sync with system clipboard
vim.o.clipboard = "unnamedplus"
vim.o.showmode = false -- Dont show mode since we have a statusline
vim.o.laststatus = 0
vim.o.cmdheight = 0
-- Fold
vim.o.foldenable = true
vim.o.foldexpr = "v:lua.vim.treesitter.foldexpr()"
vim.o.foldlevel = 99
vim.o.foldmethod = "expr"
vim.o.foldtext = ""
-- TODO: Replace with `vim.o` once it supports tables
-- See <https://github.com/neovim/neovim/issues/20107>
vim.opt.fillchars = {
foldopen = "",
foldclose = "",
fold = " ",
foldsep = " ",
diff = "╱",
eob = " ",
}
vim.o.shiftwidth = 2
vim.o.colorcolumn = "80"
vim.o.winborder = "rounded"
-- Set working directory when launching NeoVim
-- local group_cdpwd = vim.api.nvim_create_augroup("cdpwd", { clear = true })
-- vim.api.nvim_create_autocmd("VimEnter", {
-- pattern = "*",
-- group = group_cdpwd,
-- callback = function()
-- -- https://neovim.io/doc/user/builtin.html#expand()
-- local current_dir = vim.fn.expand("%:p:h")
-- vim.api.nvim_set_current_dir(current_dir)
-- end,
-- })