Update config/nvim/lua/plugins/init.lua
This commit is contained in:
parent
e0316a18ed
commit
c5bd8f63fb
|
|
@ -4,8 +4,11 @@ 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({
|
|
||||||
|
local ok_fzf, fzf = pcall(require, "fzf-lua")
|
||||||
|
if ok_fzf then
|
||||||
|
fzf.setup({
|
||||||
files = {
|
files = {
|
||||||
cmd = (function()
|
cmd = (function()
|
||||||
if vim.fn.findfile("project.godot", vim.fn.getcwd() .. ";") ~= "" then
|
if vim.fn.findfile("project.godot", vim.fn.getcwd() .. ";") ~= "" then
|
||||||
|
|
@ -15,9 +18,19 @@ require("fzf-lua").setup({
|
||||||
end
|
end
|
||||||
end)(),
|
end)(),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
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 = {
|
ensure_installed = {
|
||||||
-- Godot
|
-- Godot
|
||||||
"gdscript",
|
"gdscript",
|
||||||
|
|
@ -46,4 +59,5 @@ require("nvim-treesitter.configs").setup({
|
||||||
},
|
},
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue