-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathinit.lua
More file actions
47 lines (36 loc) · 1.26 KB
/
Copy pathinit.lua
File metadata and controls
47 lines (36 loc) · 1.26 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
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.signcolumn = "yes"
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.textwidth = 80
vim.diagnostic.config({ virtual_text = true })
vim.cmd.colorscheme("catppuccin")
vim.pack.add({
"https://github.com/nvim-treesitter/nvim-treesitter",
"https://github.com/saghen/blink.cmp",
"https://github.com/neovim/nvim-lspconfig",
"https://github.com/mason-org/mason.nvim",
"https://github.com/mason-org/mason-lspconfig.nvim",
"https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim",
}, { confirm = false })
require("nvim-treesitter.install").update("all")
require("nvim-treesitter.configs").setup({ auto_install = true })
require("blink.cmp").setup({ fuzzy = { implementation = "lua" } })
local lsp_servers = {
lua_ls = { Lua = { workspace = { library = vim.api.nvim_get_runtime_file("lua", true) } }, },
}
require("mason").setup()
require("mason-lspconfig").setup()
require("mason-tool-installer").setup({
ensure_installed = vim.tbl_keys(lsp_servers),
})
for server, config in pairs(lsp_servers) do
vim.lsp.config(server, {
settings = config,
on_attach = function(_, bufnr)
vim.keymap.set("n", "grd", vim.lsp.buf.definition, { buffer = bufnr })
end,
})
end