Update config/nvim/lua/plugins/init.lua

This commit is contained in:
jasonhilder 2026-04-07 09:49:07 +02:00
parent e0316a18ed
commit c5bd8f63fb
1 changed files with 56 additions and 42 deletions

View File

@ -4,8 +4,11 @@ vim.pack.add({
{ src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "master" },
})
-- Required funny setup for cleaning up output in godot projects.
require("fzf-lua").setup({
local map = vim.keymap.set
local ok_fzf, fzf = pcall(require, "fzf-lua")
if ok_fzf then
fzf.setup({
files = {
cmd = (function()
if vim.fn.findfile("project.godot", vim.fn.getcwd() .. ";") ~= "" then
@ -17,7 +20,17 @@ require("fzf-lua").setup({
},
})
require("nvim-treesitter.configs").setup({
map("n", "<leader>ff", function() fzf.files() end)
map("n", "<leader>fo", function() fzf.buffers() end)
map("n", "<leader>sp", function() fzf.grep_project() end)
map("n", "<leader>sf", function() fzf.grep_curbuf() end)
map("n", "<leader>sw", function() fzf.grep_cword() end)
map("n", "<leader>sh", function() fzf.help_tags() end)
end
local ok_ts, ts = pcall(require, "nvim-treesitter.configs")
if ok_ts then
ts.setup({
ensure_installed = {
-- Godot
"gdscript",
@ -47,3 +60,4 @@ require("nvim-treesitter.configs").setup({
highlight = { enable = true },
indent = { enable = true },
})
end