diff --git a/lua/pika/plugins/lsp/formatting.lua b/lua/pika/plugins/lsp/formatting.lua index 382906e..bb84ac6 100644 --- a/lua/pika/plugins/lsp/formatting.lua +++ b/lua/pika/plugins/lsp/formatting.lua @@ -21,6 +21,8 @@ return { graphql = { "prettier" }, liquid = { "prettier" }, sh = { "shfmt" }, + zsh = { "shfmt" }, + batch = { "shfmt", "prettier" }, lua = { "stylua" }, }, format_on_save = { diff --git a/lua/pika/plugins/telesnip.lua b/lua/pika/plugins/telesnip.lua index 7ce9ffc..61fe3ce 100644 --- a/lua/pika/plugins/telesnip.lua +++ b/lua/pika/plugins/telesnip.lua @@ -1,16 +1,21 @@ --- Example assuming you're configuring your plugin in lazy.nvim return { "https://git.k4li.de/pika/telesnip.nvim", config = function() -- Load your plugin local telesnip = require("telesnip") + telesnip.setup({ + -- snippet_path = "/path/to/your/snippets", + }) - -- Define the :Snippets command - vim.api.nvim_create_user_command("Snippets", function() - telesnip.snippet_picker() + -- Define the :TelesnipSnippets command + vim.api.nvim_create_user_command("TelesnipSnippets", function() + telesnip.telesnip_show()() end, {}) -- Optional: Set up a keybinding if desired - vim.keymap.set("n", "S", ":Snippets", { desc = "Open Snippet Picker" }) + vim.keymap.set("n", "S", ":TelesnipSnippets", { desc = "Open Snippet Picker" }) + vim.keymap.set("v", "cs", function() + require("telesnip").save_custom_snippet() + end, { noremap = true }) end, } diff --git a/lua/pika/plugins/treesitter.lua b/lua/pika/plugins/treesitter.lua index fbcbbf5..b2db9fd 100644 --- a/lua/pika/plugins/treesitter.lua +++ b/lua/pika/plugins/treesitter.lua @@ -1,37 +1,59 @@ return { - "nvim-treesitter/nvim-treesitter", - event = { "BufReadPre", "BufNewFile" }, - build = ":TSUpdate", - dependencies = { - "windwp/nvim-ts-autotag", - }, - config = function() - require("nvim-treesitter.configs").setup({ - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, - indent = { enable = true }, - autotag = { enable = true }, - ensure_installed = { - "bash", "fish", "http", "html", "php", "css", "scss", - "gitignore", "git_config", "markdown", "markdown_inline", - "dockerfile", "yaml", "json", "javascript", "typescript", - "graphql", "lua", "query", "c", "prisma", "hyprlang", - "ini", "passwd", "vim", "vimdoc", - }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "", - node_incremental = "", - scope_incremental = false, - node_decremental = "", - }, - }, - -- Add these fields to address the error - sync_install = true, - auto_install = true, - }) - end, + "nvim-treesitter/nvim-treesitter", + event = { "BufReadPre", "BufNewFile" }, + build = ":TSUpdate", + dependencies = { + "windwp/nvim-ts-autotag", + }, + config = function() + require("nvim-treesitter.configs").setup({ + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + indent = { enable = true }, + autotag = { enable = true }, + ensure_installed = { + "bash", + "fish", + "http", + "html", + "php", + "css", + "scss", + "gitignore", + "git_config", + "markdown", + "markdown_inline", + "dockerfile", + "yaml", + "json", + "javascript", + "typescript", + "graphql", + "lua", + "query", + "c", + "prisma", + "hyprlang", + "ini", + "passwd", + "vim", + "vimdoc", + -- "sh", + }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "", + node_incremental = "", + scope_incremental = false, + node_decremental = "", + }, + }, + -- Add these fields to address the error + sync_install = true, + auto_install = true, + }) + end, } diff --git a/lua/pika/plugins/vim-maximizer.lua b/lua/pika/plugins/vim-maximizer.lua index 7b56987..32c2260 100644 --- a/lua/pika/plugins/vim-maximizer.lua +++ b/lua/pika/plugins/vim-maximizer.lua @@ -1,6 +1,6 @@ return { - 'szw/vim-maximizer', - keys = { - { '', 'MaximizerToggle', desc = 'Maximize/minimize a split' }, - }, + "szw/vim-maximizer", + keys = { + { "", "MaximizerToggle", desc = "Maximize/minimize a split" }, + }, }