98 lines
2.3 KiB
Lua
98 lines
2.3 KiB
Lua
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
if not vim.loop.fs_stat(lazypath) then
|
|
vim.fn.system({
|
|
"git",
|
|
"clone",
|
|
"--filter=blob:none",
|
|
"https://github.com/folke/lazy.nvim.git",
|
|
"--branch=stable", -- latest stable release
|
|
lazypath,
|
|
})
|
|
end
|
|
vim.opt.rtp:prepend(lazypath)
|
|
require("lazy").setup({
|
|
"nvim-treesitter/nvim-treesitter",
|
|
"morhetz/gruvbox",
|
|
{ "nvim-telescope/telescope.nvim", dependencies = {"nvim-lua/plenary.nvim"} },
|
|
"windwp/nvim-autopairs",
|
|
{"sheerun/vim-polyglot", enabled=false},
|
|
{"habamax/vim-godot", enabled=false },
|
|
"mfussenegger/nvim-dap",
|
|
})
|
|
require('statusline')
|
|
require('keybindings')
|
|
|
|
vim.opt.nu = true
|
|
vim.opt.relativenumber = true
|
|
|
|
vim.opt.tabstop = 4
|
|
vim.opt.softtabstop = 4
|
|
vim.opt.shiftwidth = 4
|
|
vim.opt.expandtab = true
|
|
|
|
vim.opt.smartindent = true
|
|
|
|
vim.opt.wrap = false
|
|
require('nvim-treesitter.configs').setup {
|
|
ensure_installed = { "c", "cpp", "lua", "go", "gdscript", "godot_resource", "gdshader", "odin", "python", "sql", "zig", "hlsl" },
|
|
sync_install = false,
|
|
auto_install = false,
|
|
highlight = {
|
|
enable = true,
|
|
additional_vim_regex_highlighting = false,
|
|
},
|
|
incremental_selection = {
|
|
},
|
|
indent = {
|
|
enable = true,
|
|
},
|
|
playground = {
|
|
enabled = false,
|
|
persist_queries = false,
|
|
}
|
|
}
|
|
|
|
require('nvim-autopairs').setup{}
|
|
require('telescope').setup{
|
|
defaults = {
|
|
file_ignore_patterns = {
|
|
"%.uid", "%.png", "%.gltf", "%.import", "%.glb"
|
|
},
|
|
},
|
|
pickers = {
|
|
find_files = {
|
|
--theme = "dropdown",
|
|
},
|
|
git_files = {
|
|
--theme = "dropdown",
|
|
}
|
|
},
|
|
extensions = {
|
|
},
|
|
}
|
|
vim.filetype.add({
|
|
extension = {
|
|
odin = "odin"
|
|
}
|
|
})
|
|
|
|
-- Server mode for godot
|
|
local paths_to_check = {'/', '/../'}
|
|
local is_godot_project = false
|
|
local godot_project_path = ''
|
|
local cwd = vim.fn.getcwd()
|
|
|
|
for key, value in pairs(paths_to_check) do
|
|
if vim.uv.fs_stat(cwd .. value .. 'project.godot') then
|
|
is_godot_project = true
|
|
godot_project_path = cwd .. value
|
|
break
|
|
end
|
|
end
|
|
|
|
local is_server_running = vim.uv.fs_stat(godot_project_path .. '/server.pipe')
|
|
if is_godot_project and not is_server_running then
|
|
vim.fn.serverstart(godot_project_path .. '/server.pipe')
|
|
end
|
|
|