Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 30 additions & 12 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
vim.o.number = true
-- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it!
-- vim.o.relativenumber = true
vim.o.relativenumber = true

-- Enable mouse mode, can be useful for resizing splits for example!
vim.o.mouse = 'a'
Expand Down Expand Up @@ -205,6 +205,9 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })

-- custom keymaps
vim.keymap.set('i', 'jj', '<Esc>', { desc = 'Escape from Insert mode' })

-- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands`

Expand Down Expand Up @@ -247,7 +250,20 @@ rtp:prepend(lazypath)
-- NOTE: Here is where you install your plugins.
require('lazy').setup({
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically
{
"NMAC427/guess-indent.nvim",
config = function()
require('guess-indent').setup({
override_editorconfig = true,
filetype_exclude = {},
})
-- Set default indentation
vim.o.tabstop = 2
vim.o.shiftwidth = 2
vim.o.softtabstop = 2
vim.o.expandtab = true
end,
},

-- NOTE: Plugins can also be added by using a table,
-- with the first argument being the link and the following
Expand Down Expand Up @@ -298,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 = {
Expand Down Expand Up @@ -379,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
Expand Down Expand Up @@ -487,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',
Expand Down Expand Up @@ -673,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
--
Expand Down Expand Up @@ -835,7 +851,9 @@ require('lazy').setup({
-- <c-k>: Toggle signature help
--
-- See :h blink-cmp-config-keymap for defining your own keymap
preset = 'default',
preset = 'enter',

['<CR>'] = { 'accept', 'fallback' },

-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
Expand Down Expand Up @@ -976,15 +994,15 @@ 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.
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
--
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope!
Expand Down
158 changes: 157 additions & 1 deletion lua/custom/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,160 @@
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}
return {
{ "sindrets/diffview.nvim" },
{
"rachartier/tiny-inline-diagnostic.nvim",
event = "VeryLazy",
priority = 1000,
config = function()
require('tiny-inline-diagnostic').setup()
vim.diagnostic.config({ virtual_text = false }) -- Disable default virtual text
end
},
{
"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 = '<C-n>', -- Move to the next response popup window
prev_panel = '<C-p>', -- Move to the previous response popup window
},
},
keys = {
-- Run API request
{ "<leader>A", "<cmd>HurlRunner<CR>", desc = "Run All requests" },
{ "<leader>a", "<cmd>HurlRunnerAt<CR>", desc = "Run Api request" },
{ "<leader>te", "<cmd>HurlRunnerToEntry<CR>", desc = "Run Api request to entry" },
{ "<leader>tE", "<cmd>HurlRunnerToEnd<CR>", desc = "Run Api request from current entry to end" },
{ "<leader>tm", "<cmd>HurlToggleMode<CR>", desc = "Hurl Toggle Mode" },
{ "<leader>tv", "<cmd>HurlVerbose<CR>", desc = "Run Api in verbose mode" },
{ "<leader>tV", "<cmd>HurlVeryVerbose<CR>", desc = "Run Api in very verbose mode" },
-- Run Hurl request in visual mode
{ "<leader>h", ":HurlRunner<CR>", desc = "Hurl Runner", mode = "v" },
},
},
{
'AndrewRadev/tagalong.vim',
},
{
'windwp/nvim-ts-autotag',
config = function()
require('nvim-ts-autotag').setup {
opts = {
-- Defaults
enable_close = true, -- Auto close tags
enable_rename = true, -- Auto rename pairs of tags
enable_close_on_slash = false, -- Auto close on trailing </
},
-- Also override individual filetype configs, these take priority.
-- Empty by default, useful if one of the "opts" global settings
-- doesn't work well in a specific filetype
per_filetype = {
['html'] = {
enable_close = false,
},
},
}
end,
},
{
'stevearc/conform.nvim',
event = {
'BufReadPre',
'BufNewFile',
},
config = function()
local conform = require('conform')

conform.setup({
formatters_by_ft = {
lua = { 'stylelua' },
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 = 1500,
}
})

vim.keymap.set({ 'n', 'v' }, '<leader>l', function()
conform.format({
lsp_fallback = true,
async = false,
timeout_ms = 1000,
})
end, { desc = 'Format file or range (in visual mode)' })
end,
},
}
16 changes: 16 additions & 0 deletions lua/custom/plugins/neotree.lua
Original file line number Diff line number Diff line change
@@ -0,0 +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 = {
-- { '<leader>e', ':Neotree toggle<CR>', desc = 'Toggle NeoTree', silent = true },
-- { '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
-- },
-- },
}
11 changes: 1 addition & 10 deletions lua/kickstart/plugins/neo-tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ return {
},
lazy = false,
keys = {
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
},
opts = {
filesystem = {
window = {
mappings = {
['\\'] = 'close_window',
},
},
},
{ '<leader>e', ':Neotree toggle<CR>', desc = 'Toggle Neotree', silent = true },
},
}
Loading