Update config/nvim/lua/plugins/init.lua
This commit is contained in:
parent
e0316a18ed
commit
c5bd8f63fb
|
|
@ -4,46 +4,60 @@ vim.pack.add({
|
||||||
{ src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "master" },
|
{ src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "master" },
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Required funny setup for cleaning up output in godot projects.
|
local map = vim.keymap.set
|
||||||
require("fzf-lua").setup({
|
|
||||||
files = {
|
|
||||||
cmd = (function()
|
|
||||||
if vim.fn.findfile("project.godot", vim.fn.getcwd() .. ";") ~= "" then
|
|
||||||
return "fdfind --type f -e gd -e gdshader -e gdshaderinc -e tres -e tscn -e cfg -e json -e toml -e txt -e md --exclude={.godot,.git}"
|
|
||||||
else
|
|
||||||
return "fdfind --exclude={.git,.cache,.xmake,.zig-cache,build,tmp,node_modules,elpa} --type f -H"
|
|
||||||
end
|
|
||||||
end)(),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
require("nvim-treesitter.configs").setup({
|
local ok_fzf, fzf = pcall(require, "fzf-lua")
|
||||||
ensure_installed = {
|
if ok_fzf then
|
||||||
-- Godot
|
fzf.setup({
|
||||||
"gdscript",
|
files = {
|
||||||
"godot_resource",
|
cmd = (function()
|
||||||
-- Go
|
if vim.fn.findfile("project.godot", vim.fn.getcwd() .. ";") ~= "" then
|
||||||
"go",
|
return "fdfind --type f -e gd -e gdshader -e gdshaderinc -e tres -e tscn -e cfg -e json -e toml -e txt -e md --exclude={.godot,.git}"
|
||||||
"gomod",
|
else
|
||||||
"gosum",
|
return "fdfind --exclude={.git,.cache,.xmake,.zig-cache,build,tmp,node_modules,elpa} --type f -H"
|
||||||
"gowork",
|
end
|
||||||
-- Web (common)
|
end)(),
|
||||||
"html",
|
},
|
||||||
"css",
|
})
|
||||||
"javascript",
|
|
||||||
"typescript",
|
map("n", "<leader>ff", function() fzf.files() end)
|
||||||
-- General
|
map("n", "<leader>fo", function() fzf.buffers() end)
|
||||||
"lua",
|
map("n", "<leader>sp", function() fzf.grep_project() end)
|
||||||
"python",
|
map("n", "<leader>sf", function() fzf.grep_curbuf() end)
|
||||||
"bash",
|
map("n", "<leader>sw", function() fzf.grep_cword() end)
|
||||||
"json",
|
map("n", "<leader>sh", function() fzf.help_tags() end)
|
||||||
"toml",
|
end
|
||||||
"yaml",
|
|
||||||
"markdown",
|
local ok_ts, ts = pcall(require, "nvim-treesitter.configs")
|
||||||
"markdown_inline",
|
if ok_ts then
|
||||||
"vim",
|
ts.setup({
|
||||||
"vimdoc",
|
ensure_installed = {
|
||||||
},
|
-- Godot
|
||||||
highlight = { enable = true },
|
"gdscript",
|
||||||
indent = { enable = true },
|
"godot_resource",
|
||||||
})
|
-- Go
|
||||||
|
"go",
|
||||||
|
"gomod",
|
||||||
|
"gosum",
|
||||||
|
"gowork",
|
||||||
|
-- Web (common)
|
||||||
|
"html",
|
||||||
|
"css",
|
||||||
|
"javascript",
|
||||||
|
"typescript",
|
||||||
|
-- General
|
||||||
|
"lua",
|
||||||
|
"python",
|
||||||
|
"bash",
|
||||||
|
"json",
|
||||||
|
"toml",
|
||||||
|
"yaml",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"vim",
|
||||||
|
"vimdoc",
|
||||||
|
},
|
||||||
|
highlight = { enable = true },
|
||||||
|
indent = { enable = true },
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue