-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
24 lines (22 loc) · 694 Bytes
/
Copy pathinit.lua
File metadata and controls
24 lines (22 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require("config.lazy")
require("config.mappings")
require("config.options")
vim.diagnostic.config({ virtual_text = true })
vim.lsp.enable({ "lua_ls", "pylsp", "ts_ls", "gopls" })
vim.api.nvim_create_autocmd("BufReadPost", {
callback = function()
local mark = vim.api.nvim_buf_get_mark(0, '"')
local line = mark[1]
local col = mark[2]
local buf_name = vim.api.nvim_buf_get_name(0)
if line > 0 and line <= vim.api.nvim_buf_line_count(0) and buf_name ~= "" then
pcall(vim.api.nvim_win_set_cursor, 0, { line, col })
end
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = { "go", "lua", "python", "sql", "vue" },
callback = function()
vim.treesitter.start()
end,
})