not quite sure what I've done here
This commit is contained in:
parent
b22873f45f
commit
83aaa5aef3
18 changed files with 392 additions and 392 deletions
|
|
@ -24,7 +24,7 @@ return {
|
|||
load = function()
|
||||
require("mason").setup {
|
||||
ui = {
|
||||
-- not sure why these are nerdfont icons by default
|
||||
-- not sure why these are nerdfont icons by default
|
||||
icons = {
|
||||
package_installed = "+",
|
||||
package_pending = "?",
|
||||
|
|
|
|||
|
|
@ -1,49 +1,49 @@
|
|||
local map = core.misc.map
|
||||
|
||||
return { "L3MON4D3/LuaSnip",
|
||||
branch = "v2.*",
|
||||
config = function()
|
||||
vim.cmd("make install_jsregexp")
|
||||
end,
|
||||
lazy = function(load)
|
||||
load:keymap({"i", "s"}, "<c-a>")
|
||||
load:keymap({"i", "s"}, "<c-e>")
|
||||
load:keymap({"i", "s"}, "<c-j>")
|
||||
load:keymap({"i", "s"}, "<c-k>")
|
||||
load:auto("InsertEnter")
|
||||
end,
|
||||
load = function()
|
||||
local ls = require("luasnip")
|
||||
branch = "v2.*",
|
||||
config = function()
|
||||
vim.cmd("make install_jsregexp")
|
||||
end,
|
||||
lazy = function(load)
|
||||
load:keymap({"i", "s"}, "<c-a>")
|
||||
load:keymap({"i", "s"}, "<c-e>")
|
||||
load:keymap({"i", "s"}, "<c-j>")
|
||||
load:keymap({"i", "s"}, "<c-k>")
|
||||
load:auto("InsertEnter")
|
||||
end,
|
||||
load = function()
|
||||
local ls = require("luasnip")
|
||||
|
||||
-- replace the builtin snippet handler with luasnip so I get all my fancy
|
||||
-- stuff
|
||||
vim.snippet.expand = ls.lsp_expand
|
||||
-- replace the builtin snippet handler with luasnip so I get all my fancy
|
||||
-- stuff
|
||||
vim.snippet.expand = ls.lsp_expand
|
||||
|
||||
ls.config.setup {
|
||||
keep_roots = true,
|
||||
link_roots = true,
|
||||
link_children = true,
|
||||
exit_roots = not true
|
||||
}
|
||||
ls.config.setup {
|
||||
keep_roots = true,
|
||||
link_roots = true,
|
||||
link_children = true,
|
||||
exit_roots = not true
|
||||
}
|
||||
|
||||
map({"i", "s"}, "<C-e>", ls.expand)
|
||||
map({"i", "s"}, "<C-j>", function() ls.jump(1) end)
|
||||
map({"i", "s"}, "<C-k>", function() ls.jump(-1) end)
|
||||
map({"i", "s"}, "<C-a>", function()
|
||||
if ls.choice_active() then
|
||||
ls.change_choice(1)
|
||||
end
|
||||
end)
|
||||
map({"i", "s"}, "<C-e>", ls.expand)
|
||||
map({"i", "s"}, "<C-j>", function() ls.jump(1) end)
|
||||
map({"i", "s"}, "<C-k>", function() ls.jump(-1) end)
|
||||
map({"i", "s"}, "<C-a>", function()
|
||||
if ls.choice_active() then
|
||||
ls.change_choice(1)
|
||||
end
|
||||
end)
|
||||
|
||||
-- collect all snippets and add them
|
||||
for _, file in ipairs(vim.api.nvim_get_runtime_file("lua/snippets/*.lua",
|
||||
true)) do
|
||||
local fn = file:gsub("^.*/", ""):gsub("%.lua$", "")
|
||||
-- collect all snippets and add them
|
||||
for _, file in ipairs(vim.api.nvim_get_runtime_file("lua/snippets/*.lua",
|
||||
true)) do
|
||||
local fn = file:gsub("^.*/", ""):gsub("%.lua$", "")
|
||||
|
||||
local ret = require("snippets."..fn)
|
||||
if type(ret) ~= "boolean" then
|
||||
ls.add_snippets(fn, ret, { key = fn })
|
||||
end
|
||||
end
|
||||
end
|
||||
local ret = require("snippets."..fn)
|
||||
if type(ret) ~= "boolean" then
|
||||
ls.add_snippets(fn, ret, { key = fn })
|
||||
end
|
||||
end
|
||||
end
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,14 +20,14 @@ return { "mellow-theme/mellow.nvim",
|
|||
["NormalFloat"] = { fg = c.fg, bg = "#111111" },
|
||||
["FloatBorder"] = { bg = "#111111" },
|
||||
|
||||
-- Make pmenu look good
|
||||
["Pmenu"] = { link = "NormalFloat" },
|
||||
["PmenuSel"] = { link = "Normal" },
|
||||
["PmenuKind"] = { link = "@constant" },
|
||||
["PmenuKindSel"] = {
|
||||
fg = core.color.copyhl("Comment").fg,
|
||||
bold = true
|
||||
},
|
||||
-- Make pmenu look good
|
||||
["Pmenu"] = { link = "NormalFloat" },
|
||||
["PmenuSel"] = { link = "Normal" },
|
||||
["PmenuKind"] = { link = "@constant" },
|
||||
["PmenuKindSel"] = {
|
||||
fg = core.color.copyhl("Comment").fg,
|
||||
bold = true
|
||||
},
|
||||
|
||||
-- make diagnostics have an undercurl
|
||||
["DiagnosticUnderlineError"] = { fg = c.red, undercurl = true },
|
||||
|
|
@ -43,19 +43,19 @@ return { "mellow-theme/mellow.nvim",
|
|||
["TelescopePreviewNormal"] = { link = "NormalFloat" },
|
||||
["TelescopePreviewBorder"] = { link = "TelescopePreviewNormal" },
|
||||
|
||||
-- add highlight groups for my todo highlighting
|
||||
["TodoTODO"] = { link = "DiagnosticHint" },
|
||||
["TodoTODOBG"] = { fg = c.bg, bg = c.cyan, bold = true },
|
||||
["TodoTODOSIGN"] = { fg = c.cyan, bg = c.cyan, bold = true },
|
||||
["TodoBUG"] = { link = "DiagnosticError" },
|
||||
["TodoBUGBG"] = { fg = c.bg, bg = c.red, bold = true },
|
||||
["TodoBUGSIGN"] = { fg = c.red, bg = c.red, bold = true },
|
||||
["TodoTEST"] = { link = "DiagnosticInfo" },
|
||||
["TodoTESTBG"] = { fg = c.bg, bg = c.blue, bold = true },
|
||||
["TodoTESTSIGN"] = { fg = c.blue, bg = c.blue, bold = true },
|
||||
["TodoWARN"] = { link = "DiagnosticWarn" },
|
||||
["TodoWARNBG"] = { fg = c.bg, bg = c.yellow, bold = true },
|
||||
["TodoWARNSIGN"] = { fg = c.yellow, bg = c.yellow, bold = true },
|
||||
-- add highlight groups for my todo highlighting
|
||||
["TodoTODO"] = { link = "DiagnosticHint" },
|
||||
["TodoTODOBG"] = { fg = c.bg, bg = c.cyan, bold = true },
|
||||
["TodoTODOSIGN"] = { fg = c.cyan, bg = c.cyan, bold = true },
|
||||
["TodoBUG"] = { link = "DiagnosticError" },
|
||||
["TodoBUGBG"] = { fg = c.bg, bg = c.red, bold = true },
|
||||
["TodoBUGSIGN"] = { fg = c.red, bg = c.red, bold = true },
|
||||
["TodoTEST"] = { link = "DiagnosticInfo" },
|
||||
["TodoTESTBG"] = { fg = c.bg, bg = c.blue, bold = true },
|
||||
["TodoTESTSIGN"] = { fg = c.blue, bg = c.blue, bold = true },
|
||||
["TodoWARN"] = { link = "DiagnosticWarn" },
|
||||
["TodoWARNBG"] = { fg = c.bg, bg = c.yellow, bold = true },
|
||||
["TodoWARNSIGN"] = { fg = c.yellow, bg = c.yellow, bold = true },
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ return { "stevearc/oil.nvim",
|
|||
for i = 1, #permission_str do
|
||||
local char = permission_str:sub(i, i)
|
||||
table.insert(hls, { ({
|
||||
["-"] = "NonText",
|
||||
["r"] = "DiagnosticSignWarn",
|
||||
["w"] = "DiagnosticSignHint",
|
||||
["x"] = "DiagnosticSignOk"
|
||||
})[char], i - 1, i })
|
||||
["-"] = "NonText",
|
||||
["r"] = "DiagnosticSignWarn",
|
||||
["w"] = "DiagnosticSignHint",
|
||||
["x"] = "DiagnosticSignOk"
|
||||
})[char], i - 1, i })
|
||||
end
|
||||
return hls
|
||||
end,
|
||||
|
|
@ -26,12 +26,12 @@ return { "stevearc/oil.nvim",
|
|||
{ "size", highlight = "@number" }
|
||||
},
|
||||
|
||||
-- fix the damn border
|
||||
confirmation = { winborder = vim.o.winborder },
|
||||
progress = { winborder = vim.o.winborder },
|
||||
ssh = { winborder = vim.o.winborder },
|
||||
keymaps_help = { winborder = vim.o.winborder }
|
||||
}
|
||||
-- fix the damn border
|
||||
confirmation = { winborder = vim.o.winborder },
|
||||
progress = { winborder = vim.o.winborder },
|
||||
ssh = { winborder = vim.o.winborder },
|
||||
keymaps_help = { winborder = vim.o.winborder }
|
||||
}
|
||||
|
||||
map("n", "-", "<cmd>Oil<CR>")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
return { "NickvanDyke/opencode.nvim",
|
||||
load = function()
|
||||
core.misc.map("n", "<leader>oa", function()
|
||||
require("opencode").ask()
|
||||
end, { desc = "Ask opencode" })
|
||||
core.misc.map("v", "<leader>oa", function()
|
||||
require("opencode").ask("@selection: ")
|
||||
end, { desc = "Ask opencode about selection" })
|
||||
end
|
||||
load = function()
|
||||
core.misc.map("n", "<leader>oa", function()
|
||||
require("opencode").ask()
|
||||
end, { desc = "Ask opencode" })
|
||||
core.misc.map("v", "<leader>oa", function()
|
||||
require("opencode").ask("@selection: ")
|
||||
end, { desc = "Ask opencode about selection" })
|
||||
end
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,72 +44,72 @@ return { "nvim-telescope/telescope.nvim",
|
|||
load = function()
|
||||
local telescope = require("telescope")
|
||||
local actions = require("telescope.actions")
|
||||
local action_state = require("telescope.actions.state")
|
||||
local action_state = require("telescope.actions.state")
|
||||
|
||||
local function send_limited_to_qflist_and_open(prompt_bufnr)
|
||||
local picker = action_state.get_current_picker(prompt_bufnr)
|
||||
local entries = {}
|
||||
local max_items = 100
|
||||
local count = 0
|
||||
local function send_limited_to_qflist_and_open(prompt_bufnr)
|
||||
local picker = action_state.get_current_picker(prompt_bufnr)
|
||||
local entries = {}
|
||||
local max_items = 100
|
||||
local count = 0
|
||||
|
||||
for entry in picker.manager:iter() do
|
||||
if count >= max_items then
|
||||
break
|
||||
end
|
||||
for entry in picker.manager:iter() do
|
||||
if count >= max_items then
|
||||
break
|
||||
end
|
||||
|
||||
local filename = entry.path or entry.filename or entry.value
|
||||
local text = entry.text or entry.value
|
||||
if not text then
|
||||
if type(entry.value) == "table" then
|
||||
text = entry.value.text
|
||||
else
|
||||
text = entry.value
|
||||
end
|
||||
end
|
||||
local filename = entry.path or entry.filename or entry.value
|
||||
local text = entry.text or entry.value
|
||||
if not text then
|
||||
if type(entry.value) == "table" then
|
||||
text = entry.value.text
|
||||
else
|
||||
text = entry.value
|
||||
end
|
||||
end
|
||||
|
||||
local pattern
|
||||
if not entry.lnum then
|
||||
if type(entry.display) == "string" then
|
||||
pattern = entry.display
|
||||
elseif type(entry.ordinal) == "string" then
|
||||
pattern = entry.ordinal
|
||||
elseif type(text) == "string" then
|
||||
pattern = text
|
||||
else
|
||||
entry.lnum = 1
|
||||
end
|
||||
end
|
||||
local pattern
|
||||
if not entry.lnum then
|
||||
if type(entry.display) == "string" then
|
||||
pattern = entry.display
|
||||
elseif type(entry.ordinal) == "string" then
|
||||
pattern = entry.ordinal
|
||||
elseif type(text) == "string" then
|
||||
pattern = text
|
||||
else
|
||||
entry.lnum = 1
|
||||
end
|
||||
end
|
||||
|
||||
if filename then
|
||||
table.insert(entries, {
|
||||
filename = filename,
|
||||
text = text,
|
||||
lnum = entry.lnum,
|
||||
col = entry.col,
|
||||
if filename then
|
||||
table.insert(entries, {
|
||||
filename = filename,
|
||||
text = text,
|
||||
lnum = entry.lnum,
|
||||
col = entry.col,
|
||||
|
||||
-- we try and put a pattern in based on the info we receive from
|
||||
-- telescope so that the qf list takes us to the correct place
|
||||
pattern = pattern
|
||||
})
|
||||
count = count + 1
|
||||
end
|
||||
end
|
||||
-- we try and put a pattern in based on the info we receive from
|
||||
-- telescope so that the qf list takes us to the correct place
|
||||
pattern = pattern
|
||||
})
|
||||
count = count + 1
|
||||
end
|
||||
end
|
||||
|
||||
if #entries > 0 then
|
||||
-- make sure errors get suppressed. I don't care
|
||||
pcall(vim.fn.setqflist, {}, " ", {
|
||||
title = "Telescope Limited Results",
|
||||
items = entries
|
||||
})
|
||||
end
|
||||
if #entries > 0 then
|
||||
-- make sure errors get suppressed. I don't care
|
||||
pcall(vim.fn.setqflist, {}, " ", {
|
||||
title = "Telescope Limited Results",
|
||||
items = entries
|
||||
})
|
||||
end
|
||||
|
||||
actions.select_default(prompt_bufnr)
|
||||
end
|
||||
actions.select_default(prompt_bufnr)
|
||||
end
|
||||
|
||||
telescope.setup {
|
||||
defaults = {
|
||||
layout_strategy = "bottom_pane",
|
||||
borderchars = { " ", " ", " ", " ", " ", " ", " ", " " },
|
||||
layout_strategy = "bottom_pane",
|
||||
borderchars = { " ", " ", " ", " ", " ", " ", " ", " " },
|
||||
mappings = {
|
||||
i = {
|
||||
["<esc>"] = actions.close,
|
||||
|
|
@ -119,11 +119,11 @@ return { "nvim-telescope/telescope.nvim",
|
|||
}
|
||||
}
|
||||
},
|
||||
pickers = {
|
||||
colorscheme = {
|
||||
enable_preview = true
|
||||
}
|
||||
},
|
||||
pickers = {
|
||||
colorscheme = {
|
||||
enable_preview = true
|
||||
}
|
||||
},
|
||||
extensions = {
|
||||
fzf = {}
|
||||
}
|
||||
|
|
@ -154,6 +154,6 @@ return { "nvim-telescope/telescope.nvim",
|
|||
}
|
||||
end, { desc = "find files in plugin directory" })
|
||||
|
||||
map("n", "<leader>tt", "<cmd>Telescope<CR>")
|
||||
map("n", "<leader>tt", "<cmd>Telescope<CR>")
|
||||
end
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,11 +49,11 @@ return {
|
|||
}
|
||||
}
|
||||
|
||||
core.misc.map("n", "<leader><leader>t", function()
|
||||
pcall(vim.cmd.TSInstall, vim.api.nvim_get_option_value("ft", {
|
||||
buf = vim.api.nvim_get_current_buf()
|
||||
}))
|
||||
end)
|
||||
core.misc.map("n", "<leader><leader>t", function()
|
||||
pcall(vim.cmd.TSInstall, vim.api.nvim_get_option_value("ft", {
|
||||
buf = vim.api.nvim_get_current_buf()
|
||||
}))
|
||||
end)
|
||||
end
|
||||
},
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ return {
|
|||
|
||||
{ "windwp/nvim-ts-autotag",
|
||||
reqs = "nvim-treesitter/nvim-treesitter",
|
||||
disable = true,
|
||||
disable = true,
|
||||
-- lazy = dep_short.auto({ "BufReadPre", "BufNewFile" }),
|
||||
load = function()
|
||||
require("nvim-ts-autotag").setup {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue