diff --git a/init.lua b/init.lua index 3c2dc059..3d6a8cba 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.o` @@ -314,7 +314,7 @@ require('lazy').setup({ -- Then, because we use the `opts` key (recommended), the configuration runs -- after the plugin has been loaded as `require(MODULE).setup(opts)`. - { -- Useful plugin to show you pending keybinds. + { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', event = 'VimEnter', -- Sets the loading event to 'VimEnter' opts = { @@ -395,7 +395,7 @@ require('lazy').setup({ { 'nvim-telescope/telescope-ui-select.nvim' }, -- Useful for getting pretty icons, but requires a Nerd Font. - { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, + { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, }, config = function() -- Telescope is a fuzzy finder that comes with a lot of different things that @@ -503,7 +503,7 @@ require('lazy').setup({ 'WhoIsSethDaniel/mason-tool-installer.nvim', -- Useful status updates for LSP. - { 'j-hui/fidget.nvim', opts = {} }, + { 'j-hui/fidget.nvim', opts = {} }, -- Allows extra capabilities provided by blink.cmp 'saghen/blink.cmp', @@ -689,7 +689,7 @@ require('lazy').setup({ local servers = { -- clangd = {}, -- gopls = {}, - -- pyright = {}, + pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -851,9 +851,9 @@ require('lazy').setup({ -- : Toggle signature help -- -- See :h blink-cmp-config-keymap for defining your own keymap - preset = 'default', + preset = 'enter', - -- [''] = { 'select_and_accept' }, + [''] = { 'accept', 'fallback' }, -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps @@ -994,9 +994,9 @@ require('lazy').setup({ -- require 'kickstart.plugins.debug', -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index de86a12f..143f6330 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -3,6 +3,64 @@ -- -- See the kickstart.nvim README for more information return { + { + "jellydn/hurl.nvim", + dependencies = { + "MunifTanjim/nui.nvim", + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + -- Optional, for markdown rendering with render-markdown.nvim + { + 'MeanderingProgrammer/render-markdown.nvim', + opts = { + file_types = { "markdown" }, + }, + ft = { "markdown" }, + }, + }, + ft = "hurl", + opts = { + -- Show debugging info + debug = false, + -- Show notification on run + show_notification = false, + -- Show response in popup or split + mode = "split", + -- Default formatter + formatters = { + json = { 'jq' }, -- Make sure you have install jq in your system, e.g: brew install jq + html = { + 'prettier', -- Make sure you have install prettier in your system, e.g: npm install -g prettier + '--parser', + 'html', + }, + xml = { + 'tidy', -- Make sure you have installed tidy in your system, e.g: brew install tidy-html5 + '-xml', + '-i', + '-q', + }, + }, + -- Default mappings for the response popup or split views + mappings = { + close = 'q', -- Close the response popup or split view + next_panel = '', -- Move to the next response popup window + prev_panel = '', -- Move to the previous response popup window + }, + }, + keys = { + -- Run API request + { "A", "HurlRunner", desc = "Run All requests" }, + { "a", "HurlRunnerAt", desc = "Run Api request" }, + { "te", "HurlRunnerToEntry", desc = "Run Api request to entry" }, + { "tE", "HurlRunnerToEnd", desc = "Run Api request from current entry to end" }, + { "tm", "HurlToggleMode", desc = "Hurl Toggle Mode" }, + { "tv", "HurlVerbose", desc = "Run Api in verbose mode" }, + { "tV", "HurlVeryVerbose", desc = "Run Api in very verbose mode" }, + -- Run Hurl request in visual mode + { "h", ":HurlRunner", desc = "Hurl Runner", mode = "v" }, + }, + }, { 'AndrewRadev/tagalong.vim', }, @@ -39,14 +97,45 @@ return { conform.setup({ formatters_by_ft = { lua = { 'stylelua' }, - typescript = { 'prettierd', 'prettier', 'biome' }, - typescriptreact = { 'prettierd', 'prettier', 'biome' }, - javascript = { 'prettierd', 'prettier', 'biome' }, - javascriptreact = { 'prettierd', 'prettier', 'biome' }, + python = { 'black', 'flake8' }, + typescript = { 'biome', 'prettier' }, + typescriptreact = { 'biome', 'prettier' }, + javascript = { 'biome', 'prettier' }, + javascriptreact = { 'biome', 'prettier' }, + json = { 'biome', 'prettier' }, + yaml = { 'prettier' }, + markdown = { 'prettier' }, + css = { 'biome', 'prettier' }, + scss = { 'prettier' }, + html = { 'prettier' }, + }, + formatters = { + prettier = { + -- Use the project's prettier config by looking for it in parent directories + cwd = require('conform.util').root_file({ + 'package.json', + '.prettierrc', + '.prettierrc.json', + '.prettierrc.js', + '.prettierrc.mjs', + 'prettier.config.js', + 'prettier.config.mjs', + }), + require_cwd = true, + }, + biome = { + -- Use the project's biome config by looking for it in parent directories + cwd = require('conform.util').root_file({ + 'biome.json', + 'biome.jsonc', + 'package.json', + }), + require_cwd = true, + }, }, format_on_save = { lsp_fallback = true, - timeout_ms = 500, + timeout_ms = 1500, } }) @@ -54,7 +143,7 @@ return { conform.format({ lsp_fallback = true, async = false, - timeout_ms = 500, + timeout_ms = 1000, }) end, { desc = 'Format file or range (in visual mode)' }) end, diff --git a/lua/custom/plugins/neotree.lua b/lua/custom/plugins/neotree.lua index bbb35a60..7c6a6a73 100644 --- a/lua/custom/plugins/neotree.lua +++ b/lua/custom/plugins/neotree.lua @@ -1,16 +1,16 @@ return { - { - 'nvim-neo-tree/neo-tree.nvim', - branch = 'v3.x', - dependencies = { - 'nvim-lua/plenary.nvim', - 'MunifTanjim/nui.nvim', - 'nvim-tree/nvim-web-devicons', -- optional, but recommended - }, - lazy = false, -- neo-tree will lazily load itself - keys = { - { 'e', ':Neotree toggle', desc = 'Toggle NeoTree', silent = true }, - { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, - }, - }, + -- { + -- 'nvim-neo-tree/neo-tree.nvim', + -- branch = 'v3.x', + -- dependencies = { + -- 'nvim-lua/plenary.nvim', + -- 'MunifTanjim/nui.nvim', + -- 'nvim-tree/nvim-web-devicons', -- optional, but recommended + -- }, + -- lazy = false, -- neo-tree will lazily load itself + -- keys = { + -- { 'e', ':Neotree toggle', desc = 'Toggle NeoTree', silent = true }, + -- { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, + -- }, + -- }, } diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index c7067891..2b9050ee 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -11,15 +11,6 @@ return { }, lazy = false, keys = { - { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, - }, - opts = { - filesystem = { - window = { - mappings = { - ['\\'] = 'close_window', - }, - }, - }, + { 'e', ':Neotree toggle', desc = 'Toggle Neotree', silent = true }, }, }