diff --git a/nvim/lua/olinpin/plugins/avante.lua b/nvim/lua/olinpin/plugins/avante.lua index b3ccf93..1b2835a 100644 --- a/nvim/lua/olinpin/plugins/avante.lua +++ b/nvim/lua/olinpin/plugins/avante.lua @@ -17,6 +17,8 @@ return { vim.keymap.del("n", "as") vim.keymap.del("n", "at") vim.keymap.del("n", "a?") + vim.keymap.del("n", "aB") + vim.keymap.del("n", "aS") end) end, opts = { diff --git a/nvim/lua/olinpin/plugins/conform.lua b/nvim/lua/olinpin/plugins/conform.lua new file mode 100644 index 0000000..ef1df58 --- /dev/null +++ b/nvim/lua/olinpin/plugins/conform.lua @@ -0,0 +1,25 @@ +return { + "stevearc/conform.nvim", + event = 'BufWritePre', -- uncomment for format on save + opts = { + lsp_fallback = true, + + formatters_by_ft = { + lua = { "stylua" }, + + javascript = { "prettier" }, + css = { "prettier" }, + html = { "prettier" }, + + sh = { "shfmt" }, + + go = {"goimports", "gofumpt" }, + }, + + format_on_save = { + -- These options will be passed to conform.format() + timeout_ms = 500, + lsp_fallback = true, + }, + }, +} diff --git a/nvim/lua/olinpin/plugins/copilot.lua b/nvim/lua/olinpin/plugins/copilot.lua index 34d90a8..8c77819 100644 --- a/nvim/lua/olinpin/plugins/copilot.lua +++ b/nvim/lua/olinpin/plugins/copilot.lua @@ -1,22 +1,22 @@ return { - "zbirenbaum/copilot.lua", - cmd = "Copilot", - event = "InsertEnter", - config = function () - require("copilot").setup({ - suggestion = { - enabled = true, - auto_trigger = true, - keymap = { - accept = "…" - } - }, - panel = { - enabled = false, - }, - filetypes = { - ["."] = false, - } - }) - end + "zbirenbaum/copilot.lua", + cmd = "Copilot", + event = "InsertEnter", + config = function() + require("copilot").setup({ + suggestion = { + enabled = true, + auto_trigger = true, + keymap = { + accept = "…", + }, + }, + panel = { + enabled = false, + }, + filetypes = { + ["."] = false, + }, + }) + end, } diff --git a/nvim/lua/olinpin/plugins/go-ide.lua b/nvim/lua/olinpin/plugins/go-ide.lua new file mode 100644 index 0000000..9551809 --- /dev/null +++ b/nvim/lua/olinpin/plugins/go-ide.lua @@ -0,0 +1,3 @@ +return { + "https://github.com/plentiform/go-ide", +} diff --git a/nvim/lua/olinpin/plugins/hardtime.lua b/nvim/lua/olinpin/plugins/hardtime.lua index 69bf788..7e55e60 100644 --- a/nvim/lua/olinpin/plugins/hardtime.lua +++ b/nvim/lua/olinpin/plugins/hardtime.lua @@ -1,9 +1,9 @@ -return { - "m4xshen/hardtime.nvim", - lazy = false, - dependencies = { "MunifTanjim/nui.nvim" }, - opts = {}, - config = function(_, opts) - require("hardtime").setup(opts) - end, -} +return {} +-- "m4xshen/hardtime.nvim", +-- lazy = false, +-- dependencies = { "MunifTanjim/nui.nvim" }, +-- opts = {}, +-- config = function(_, opts) +-- require("hardtime").setup(opts) +-- end, +-- } diff --git a/nvim/lua/olinpin/plugins/telescope.lua b/nvim/lua/olinpin/plugins/telescope.lua index 23f9802..2da65a1 100644 --- a/nvim/lua/olinpin/plugins/telescope.lua +++ b/nvim/lua/olinpin/plugins/telescope.lua @@ -33,47 +33,66 @@ return { buffer_previewer_maker = new_maker, }, pickers = { - find_files = { - -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. - find_command = { "rg", "--files", "--hidden", "--no-ignore", - "--glob", "!**/.git/*", "--glob", "!**/venv/*", "--glob", "!**/.venv/*", "--glob", - "!**/node_modules/*", - "--glob", "!**/vendor/*", "--glob", "!**/var/cache/*", - "--glob", "!**/.next/*", "--glob", "!**/out/*", "--glob", "!**/dist/*", "--glob", "!**.min.js" - }, - }, + find_files = { + -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. + find_command = { + "rg", + "--files", + "--hidden", + "--no-ignore", + "--glob", + "!**/.git/*", + "--glob", + "!**/venv/*", + "--glob", + "!**/.venv/*", + "--glob", + "!**/node_modules/*", + "--glob", + "!**/vendor/*", + "--glob", + "!**/var/cache/*", + "--glob", + "!**/.next/*", + "--glob", + "!**/out/*", + "--glob", + "!**/dist/*", + "--glob", + "!**.min.js", + }, + }, }, preview = { filesize_limit = 0.5, -- MB }, }) - local function grepInFiles() - local actions = require("telescope.actions") - local action_state = require("telescope.actions.state") - builtin.filetypes({ - attach_mappings = function(prompt_bufnr, _) - actions.select_default:replace(function() - actions.close(prompt_bufnr) - local selection = action_state.get_selected_entry() - local filetype = selection.value - - builtin.live_grep({ - additional_args = function() - return { "--glob", "*." .. filetype } - end, - }) - end) - return true - end, - }) - end - vim.keymap.set("n", "ft", grepInFiles, { desc = "Live grep by filetype" }) - vim.keymap.set('n', '*', builtin.grep_string, {desc = "Grep current string"}) - vim.keymap.set('n', 'ff', builtin.find_files, {desc = "Find files"}) - vim.keymap.set('n', 'fg', builtin.git_branches, {desc = "Find Git branches" }) - vim.keymap.set('n', 'fc', builtin.git_commits, {desc = "Find Commits" }) - vim.keymap.set('n', 'fw', builtin.live_grep, {desc = "Find Words" }) + local function grepInFiles() + local actions = require("telescope.actions") + local action_state = require("telescope.actions.state") + builtin.filetypes({ + attach_mappings = function(prompt_bufnr, _) + actions.select_default:replace(function() + actions.close(prompt_bufnr) + local selection = action_state.get_selected_entry() + local filetype = selection.value + builtin.live_grep({ + additional_args = function() + return { "--glob", "*." .. filetype } + end, + }) + end) + return true + end, + }) + end + vim.keymap.set("n", "ft", grepInFiles, { desc = "Live grep by filetype" }) + vim.keymap.set("n", "*", builtin.grep_string, { desc = "Grep current string" }) + vim.keymap.set("n", "ff", builtin.find_files, { desc = "Find files" }) + vim.keymap.set("n", "fg", builtin.git_branches, { desc = "Find Git branches" }) + vim.keymap.set("n", "fc", builtin.git_commits, { desc = "Find Commits" }) + vim.keymap.set("n", "fw", builtin.live_grep, { desc = "Find Words" }) end, }