Merge branch 'main' of github2:MasterGordon/neovim-config

This commit is contained in:
MasterGordon 2024-08-16 11:36:13 +02:00
commit 4645dacc38
3 changed files with 70 additions and 72 deletions

View File

@ -10,18 +10,18 @@
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"crates.nvim": { "branch": "main", "commit": "cd670ecc862469557b12d12e7116d7afd2fd9c0f" },
"crates.nvim": { "branch": "main", "commit": "d1be10c1fcf4adb1eed2f2f510176db035efc68d" },
"cspell.nvim": { "branch": "main", "commit": "508b64a23bd8f9473c59d083a92712486f6f138d" },
"editorconfig-vim": { "branch": "master", "commit": "8b7da79e9daee7a3f3a8d4fe29886b9756305aff" },
"fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" },
"formatter.nvim": { "branch": "master", "commit": "ad246d34ce7a32f752071ed81b09b94e6b127fad" },
"gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" },
"gitsigns.nvim": { "branch": "main", "commit": "f074844b60f9e151970fbcdbeb8a2cd52b6ef25a" },
"heirline.nvim": { "branch": "master", "commit": "0d797435e54645a5f98bad7ad6046aac1ef95c1e" },
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
"lightspeed.nvim": { "branch": "main", "commit": "fcc72d8a4d5f4ebba62d8a3a0660f88f1b5c3b05" },
"lsp_signature.nvim": { "branch": "master", "commit": "a38da0a61c172bb59e34befc12efe48359884793" },
"lspkind-nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "f2acd4a21db1ca0a12559e7a9f7cdace3bdbfb09" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "ba9c2f0b93deb48d0a99ae0e8d8dd36f7cc286d6" },
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
@ -32,18 +32,18 @@
"neotest-zig": { "branch": "main", "commit": "b3e6246c07d3d4f06075f33aea896affd25f0de9" },
"none-ls.nvim": { "branch": "main", "commit": "cfa65d86e21eeb60544d5e823f6db43941322a53" },
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
"nvim-autopairs": { "branch": "master", "commit": "48ca9aaee733911424646cb1605f27bc01dedbe3" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-autopairs": { "branch": "master", "commit": "e38c5d837e755ce186ae51d2c48e1b387c4425c6" },
"nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-dap": { "branch": "master", "commit": "2b428ff2632e73295e9decbcf1c40d8e26213305" },
"nvim-dap": { "branch": "master", "commit": "bc03b83c94d0375145ff5ac6a6dcf28c1241e06f" },
"nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" },
"nvim-lspconfig": { "branch": "master", "commit": "a67bc39aaa4f1e13212c5022a561120846eaef27" },
"nvim-lspconfig": { "branch": "master", "commit": "fdc44768a09a65140aa00c92872a5381ad486485" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
"nvim-treesitter": { "branch": "master", "commit": "db92f60ed0c50e747155d685e977b18327f20b3a" },
"nvim-treesitter": { "branch": "master", "commit": "65310b64eee19a6e74e1b6f607a9f46f751290fe" },
"nvim-ts-autotag": { "branch": "main", "commit": "dc5e1687ab76ee02e0f11c5ce137f530b36e98b3" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "6b5f95aa4d24f2c629a74f2c935c702b08dbde62" },
"nvim-vtsls": { "branch": "main", "commit": "45c6dfea9f83a126e9bfc5dd63430562b3f8af16" },
"nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" },
"nvim-web-devicons": { "branch": "master", "commit": "5be6c4e685618b99c3210a69375b38a1202369b4" },
"nvim-window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" },
"omnisharp-vim": { "branch": "master", "commit": "f9c5d3e3375e8b5688a4506e813cb21bdc7329b1" },
"outline.nvim": { "branch": "main", "commit": "b47514b8f4ae3207c499a69eec05c29cf2182af8" },
@ -59,7 +59,7 @@
"supermaven-nvim": { "branch": "main", "commit": "d71257f431e190d9236d7f30da4c2d659389e91f" },
"tailwind-tools.nvim": { "branch": "master", "commit": "48523580c6af449a7a57610ce5596c716cf4363a" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "68a6d8e8a0a8276ad56dc2a5bc29a4767a8eb5da" },
"telescope.nvim": { "branch": "master", "commit": "10b8a82b042caf50b78e619d92caf0910211973d" },
"template-string.nvim": { "branch": "main", "commit": "419bfb2e4d5f0e6ddd0d4435f85b69da0d88d524" },
"todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" },
"typescript.nvim": { "branch": "main", "commit": "4de85ef699d7e6010528dcfbddc2ed4c2c421467" },

View File

@ -1,6 +1,3 @@
local execute = vim.api.nvim_command
local fn = vim.fn
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system(
@ -16,27 +13,6 @@ if not vim.loop.fs_stat(lazypath) then
end
vim.opt.rtp:prepend(lazypath)
local quick_prompts = {
["Code actions"] = true
}
local selectX = function(n)
return function(bufnr)
local a = require("telescope.actions")
local s = require("telescope.actions.state")
local picker_name = s.get_current_picker(bufnr).prompt_title
if not quick_prompts[picker_name] then
-- Disable quick prompts to not press by accident
-- TODO: Still type the number
return
end
a.move_to_top(bufnr)
for _ = 1, n - 1 do
a.move_selection_next(bufnr)
end
a.select_default(bufnr)
end
end
require("lazy").setup(
{
"wbthomason/packer.nvim",
@ -132,43 +108,7 @@ require("lazy").setup(
{
"nvim-telescope/telescope.nvim",
config = function()
local dropdown_configs = {
layout_config = {
prompt_position = "top",
vertical = {
width = 80,
height = 12
}
},
border = {}
}
require("telescope").setup {
file_ignore_patterns = {"package-lock.json", ".git/"},
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown(dropdown_configs)
}
},
defaults = {
mappings = {
i = {
["<Esc>"] = "close",
["1"] = {selectX(1), type = "action"},
["2"] = {selectX(2), type = "action"},
["3"] = {selectX(3), type = "action"},
["4"] = {selectX(4), type = "action"},
["5"] = {selectX(5), type = "action"},
["6"] = {selectX(6), type = "action"},
["7"] = {selectX(7), type = "action"},
["8"] = {selectX(8), type = "action"},
["9"] = {selectX(9), type = "action"},
["0"] = {selectX(10), type = "action"}
},
n = {}
}
}
}
require("telescope").load_extension("ui-select")
require("plugins/telescope")
end,
dependencies = {
"nvim-lua/popup.nvim",
@ -238,8 +178,10 @@ require("lazy").setup(
{
"supermaven-inc/supermaven-nvim",
config = function()
if not (vim.fn.has_key(vim.fn.environ(), "LOAD_SUPERMAVEN") == 0) then
require("supermaven-nvim").setup({})
end
end
},
{
"ggandor/lightspeed.nvim",

56
lua/plugins/telescope.lua Normal file
View File

@ -0,0 +1,56 @@
local selectX = function(n)
return function(bufnr)
local a = require("telescope.actions")
local s = require("telescope.actions.state")
local picker_name = s.get_current_picker(bufnr).prompt_title
if not quick_prompts[picker_name] then
-- Disable quick prompts to not press by accident
-- TODO: Still type the number
return
end
a.move_to_top(bufnr)
for _ = 1, n - 1 do
a.move_selection_next(bufnr)
end
a.select_default(bufnr)
end
end
local dropdown_configs = {
layout_config = {
prompt_position = "top",
vertical = {
width = 80,
height = 12
}
},
border = {}
}
require("telescope").setup {
file_ignore_patterns = {"package-lock.json"},
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown(dropdown_configs)
}
},
defaults = {
mappings = {
i = {
["<Esc>"] = "close",
["1"] = {selectX(1), type = "action"},
["2"] = {selectX(2), type = "action"},
["3"] = {selectX(3), type = "action"},
["4"] = {selectX(4), type = "action"},
["5"] = {selectX(5), type = "action"},
["6"] = {selectX(6), type = "action"},
["7"] = {selectX(7), type = "action"},
["8"] = {selectX(8), type = "action"},
["9"] = {selectX(9), type = "action"},
["0"] = {selectX(10), type = "action"}
},
n = {}
}
}
}
require("telescope").load_extension("ui-select")