changed stuff

This commit is contained in:
ImNotTwig 2023-09-25 19:40:59 -05:00
parent d728272259
commit 176650f0f4
16 changed files with 341 additions and 469 deletions

View File

@ -2,5 +2,3 @@ require "options"
require "keymaps"
require "Lazy"
require "autocommands"

View File

@ -1,28 +1,25 @@
{
"Comment.nvim": { "branch": "master", "commit": "eab2c83a0207369900e92783f56990808082eac2" },
"DAPInstall.nvim": { "branch": "main", "commit": "8798b4c36d33723e7bba6ed6e2c202f84bb300de" },
"LuaSnip": { "branch": "master", "commit": "9bff06b570df29434a88f9c6a9cea3b21ca17208" },
"LuaSnip": { "branch": "master", "commit": "c5fb16a934892086d4ba01bac48b77c65435025e" },
"alpha-nvim": { "branch": "main", "commit": "dafa11a6218c2296df044e00f88d9187222ba6b0" },
"bufdelete.nvim": { "branch": "master", "commit": "8933abc09df6c381d47dc271b1ee5d266541448e" },
"bufferline.nvim": { "branch": "main", "commit": "c7492a76ce8218e3335f027af44930576b561013" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" },
"bufdelete.nvim": { "branch": "master", "commit": "07d1f8ba79dec59d42b975a4df1c732b2e4e37b4" },
"bufferline.nvim": { "branch": "main", "commit": "6ecd37e0fa8b156099daedd2191130e083fb1490" },
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
"cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"colorbuddy.nvim": { "branch": "master", "commit": "cdb5b0654d3cafe61d2a845e15b2b4b0e78e752a" },
"friendly-snippets": { "branch": "main", "commit": "a6f7a1609addb4e57daa6bedc300f77f8d225ab7" },
"coq_nvim": { "branch": "coq", "commit": "e7304683400a65e3f85e6973fcc2ad2a1bc811e6" },
"gitsigns.nvim": { "branch": "main", "commit": "ec4742a7eebf68bec663041d359b95637242b5c3" },
"harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" },
"indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" },
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
"lsp-zero.nvim": { "branch": "v2.x", "commit": "abd2208cf967b911402d32262042b71bdff06c26" },
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "93e58e100f37ef4fb0f897deeed20599dae9d128" },
"mason.nvim": { "branch": "main", "commit": "4546dec8b56bc56bc1d81e717e4a935bc7cd6477" },
"neoscroll.nvim": { "branch": "master", "commit": "4bc0212e9f2a7bc7fe7a6bceb15b33e39f0f41fb" },
"null-ls.nvim": { "branch": "main", "commit": "60b4a7167c79c7d04d1ff48b55f2235bf58158a7" },
"nvim-autopairs": { "branch": "master", "commit": "0e065d423f9cf649e1d92443c939a4b5073b6768" },
"nvim-cmp": { "branch": "main", "commit": "cfafe0a1ca8933f7b7968a287d39904156f2c57d" },
"nvim-autopairs": { "branch": "master", "commit": "de4f7138a68d5d5063170f2182fd27faf06b0b54" },
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
"nvim-dap": { "branch": "master", "commit": "b3d4408e29d924fe130c9397a7c3b3630b3ea671" },
"nvim-dap-ui": { "branch": "master", "commit": "1cd4764221c91686dcf4d6b62d7a7b2d112e0b13" },
@ -34,10 +31,8 @@
"nvim-web-devicons": { "branch": "master", "commit": "e283ab937e0197b37ec5d8013e49495193407324" },
"plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" },
"project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" },
"pywal.nvim": { "branch": "main", "commit": "d11b673c0e3d6eb8cbee7ea8cf4a8911f6ee24b9" },
"telescope.nvim": { "branch": "master", "commit": "40c31fdde93bcd85aeb3447bb3e2a3208395a868" },
"toggleterm.nvim": { "branch": "main", "commit": "19aad0f41f47affbba1274f05e3c067e6d718e1e" },
"tokyonight-night": { "branch": "main", "commit": "e52c41314e83232840d6970e6b072f9fba242eb9" },
"undotree": { "branch": "master", "commit": "0e11ba7325efbbb3f3bebe06213afa3e7ec75131" },
"vim-illuminate": { "branch": "master", "commit": "d6ca7f77eeaf61b3e6ce9f0e5a978d606df44298" },
"which-key.nvim": { "branch": "main", "commit": "5224c261825263f46f6771f1b644cae33cd06995" }

View File

@ -68,6 +68,9 @@ keymap("i", "<C-Up>", "{", opts)
keymap("i", "<C-Right>", "<C-o>E", opts)
keymap("i", "<C-Left>", "<C-o>B", opts)
-- deleting back a word
keymap("i", "<C-BS>", "<c-w>", opts)
-- Visual --
-- Stay in indent mode
keymap("v", "<", "<gv", opts)

View File

@ -8,30 +8,34 @@ function M.config()
local alpha = require "alpha"
local dashboard = require "alpha.themes.dashboard"
dashboard.section.header.val = {
[[ __ ]],
[[ ___ ___ ___ __ __ /\_\ ___ ___ ]],
[[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]],
[[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]],
[[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]],
[[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]],
[[ ███╗░░░███╗███████╗░█████╗░░██╗░░░░░░░██╗ ]],
[[ ████╗░████║██╔════╝██╔══██╗░██║░░██╗░░██║ ]],
[[ ██╔████╔██║█████╗░░██║░░██║░╚██╗████╗██╔╝ ]],
[[ ██║╚██╔╝██║██╔══╝░░██║░░██║░░████╔═████║░ ]],
[[ ██║░╚═╝░██║███████╗╚█████╔╝░░╚██╔╝░╚██╔╝░ ]],
[[ ╚═╝░░░░░╚═╝╚══════╝░╚════╝░░░░╚═╝░░░╚═╝░░ ]],
}
dashboard.section.buttons.val = {
dashboard.button("f", "" .. " Find file", ":Telescope find_files <CR>"),
dashboard.button("e", "" .. " New file", ":ene <BAR> startinsert <CR>"),
dashboard.button("p", "" .. " Find project", ":lua require('telescope').extensions.projects.projects()<CR>"),
dashboard.button(
"p",
"" .. " Find project",
":lua require('telescope').extensions.projects.projects()<CR>"
),
dashboard.button("r", "󰄉 " .. " Recent files", ":Telescope oldfiles <CR>"),
dashboard.button("t", "" .. " Find text", ":Telescope live_grep <CR>"),
dashboard.button("c", "" .. " Config", ":e $MYVIMRC <CR>"),
dashboard.button("q", "" .. " Quit", ":qa<CR>"),
}
local function footer()
return "chrisatmachine.com"
return "Welcome, Lydia"
end
dashboard.section.footer.val = footer()
dashboard.section.footer.opts.hl = "Type"
dashboard.section.header.opts.hl = "Include"
dashboard.section.footer.opts.hl = "Function"
dashboard.section.header.opts.hl = "Boolean"
dashboard.section.buttons.opts.hl = "Keyword"
dashboard.opts.opts.noautocmd = true

View File

@ -1,44 +1,46 @@
local M = {
"windwp/nvim-autopairs",
commit = "0e065d423f9cf649e1d92443c939a4b5073b6768",
event = "InsertEnter",
dependencies = {
{
"hrsh7th/nvim-cmp",
event = {
"InsertEnter",
"CmdlineEnter",
},
},
},
lazy = false,
}
function M.config()
require("nvim-autopairs").setup {
check_ts = true, -- treesitter integration
disable_filetype = { "TelescopePrompt" },
ts_config = {
lua = { "string", "source" },
javascript = { "string", "template_string" },
java = false,
},
fast_wrap = {
map = "<M-e>",
chars = { "{", "[", "(", '"', "'" },
pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""),
offset = 0, -- Offset from pattern match
end_key = "$",
keys = "qwertyuiopzxcvbnmasdfghjkl",
check_comma = true,
highlight = "PmenuSel",
highlight_grey = "LineNr",
},
}
local remap = vim.api.nvim_set_keymap
local npairs = require "nvim-autopairs"
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
local cmp = require "cmp"
npairs.setup { map_bs = false }
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done {})
vim.g.coq_settings = { keymap = { recommended = false } }
-- these mappings are coq recommended mappings unrelated to nvim-autopairs
remap("i", "<esc>", [[pumvisible() ? "<c-e><esc>" : "<esc>"]], { expr = true, noremap = true })
remap("i", "<c-c>", [[pumvisible() ? "<c-e><c-c>" : "<c-c>"]], { expr = true, noremap = true })
remap("i", "<tab>", [[pumvisible() ? "<c-n>" : "<tab>"]], { expr = true, noremap = true })
remap("i", "<s-tab>", [[pumvisible() ? "<c-p>" : "<bs>"]], { expr = true, noremap = true })
-- skip it, if you use another global object
_G.MUtils = {}
MUtils.CR = function()
if vim.fn.pumvisible() ~= 0 then
if vim.fn.complete_info({ "selected" }).selected ~= -1 then
return npairs.esc "<c-y>"
else
return npairs.esc "<c-e>" .. npairs.autopairs_cr()
end
else
return npairs.autopairs_cr()
end
end
remap("i", "<cr>", "v:lua.MUtils.CR()", { expr = true, noremap = true })
MUtils.BS = function()
if vim.fn.pumvisible() ~= 0 and vim.fn.complete_info({ "mode" }).mode == "eval" then
return npairs.esc "<c-e>" .. npairs.autopairs_bs()
else
return npairs.autopairs_bs()
end
end
remap("i", "<bs>", "v:lua.MUtils.BS()", { expr = true, noremap = true })
end
return M

View File

@ -1,11 +1,10 @@
local M = {
"akinsho/bufferline.nvim",
commit = "c7492a76ce8218e3335f027af44930576b561013",
event = { "BufReadPre", "BufAdd", "BufNew", "BufReadPost" },
dependencies = {
{
"famiu/bufdelete.nvim",
commit = "8933abc09df6c381d47dc271b1ee5d266541448e",
"nvim-tree/nvim-web-devicons",
},
},
}

View File

@ -1,169 +0,0 @@
local M = {
"hrsh7th/nvim-cmp",
commit = "cfafe0a1ca8933f7b7968a287d39904156f2c57d",
dependencies = {
{
"hrsh7th/cmp-nvim-lsp",
commit = "0e6b2ed705ddcff9738ec4ea838141654f12eeef",
},
{
"hrsh7th/cmp-buffer",
commit = "3022dbc9166796b644a841a02de8dd1cc1d311fa",
},
{
"hrsh7th/cmp-path",
commit = "91ff86cd9c29299a64f968ebb45846c485725f23",
},
{
"hrsh7th/cmp-cmdline",
commit = "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063",
},
{
"saadparwaiz1/cmp_luasnip",
commit = "18095520391186d634a0045dacaa346291096566",
},
{
"L3MON4D3/LuaSnip",
commit = "9bff06b570df29434a88f9c6a9cea3b21ca17208",
event = "InsertEnter",
dependencies = {
"rafamadriz/friendly-snippets",
commit = "a6f7a1609addb4e57daa6bedc300f77f8d225ab7",
},
},
{
"hrsh7th/cmp-nvim-lua",
commit = "f3491638d123cfd2c8048aefaf66d246ff250ca6",
},
},
event = {
"InsertEnter",
"CmdlineEnter",
},
}
function M.config()
local cmp = require "cmp"
local luasnip = require "luasnip"
require("luasnip/loaders/from_vscode").lazy_load()
local check_backspace = function()
local col = vim.fn.col "." - 1
return col == 0 or vim.fn.getline("."):sub(col, col):match "%s"
end
local kind_icons = {
Text = "󰉿",
Method = "m",
Function = "󰊕",
Constructor = "",
Field = "",
Variable = "󰆧",
Class = "󰌗",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "󰎠",
Enum = "",
Keyword = "󰌋",
Snippet = "",
Color = "󰏘",
File = "󰈙",
Reference = "",
Folder = "󰉋",
EnumMember = "",
Constant = "󰇽",
Struct = "",
Event = "",
Operator = "󰆕",
TypeParameter = "󰊄",
Codeium = "󰚩",
Copilot = "",
}
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body) -- For `luasnip` users.
end,
},
mapping = cmp.mapping.preset.insert {
["<C-k>"] = cmp.mapping.select_prev_item(),
["<C-j>"] = cmp.mapping.select_next_item(),
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
["<C-e>"] = cmp.mapping {
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
},
-- Accept currently selected item. If none selected, `select` first item.
-- Set `select` to `false` to only confirm explicitly selected items.
["<CR>"] = cmp.mapping.confirm { select = true },
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expandable() then
luasnip.expand()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif check_backspace() then
fallback()
else
fallback()
end
end, {
"i",
"s",
}),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, {
"i",
"s",
}),
},
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
vim_item.kind = kind_icons[vim_item.kind]
vim_item.menu = ({
nvim_lsp = "",
nvim_lua = "",
luasnip = "",
buffer = "",
path = "",
emoji = "",
})[entry.source.name]
return vim_item
end,
},
sources = {
{ name = "nvim_lsp" },
{ name = "nvim_lua" },
{ name = "luasnip" },
{ name = "buffer" },
{ name = "path" },
},
confirm_opts = {
behavior = cmp.ConfirmBehavior.Replace,
select = false,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
experimental = {
ghost_text = true,
},
}
end
return M

View File

@ -89,6 +89,7 @@ function M.config()
Group.new('Macro' , colors.foreground)
Group.new('PreProc' , colors.foreground)
Group.new('NormalFloat' , colors.foreground)
Group.new('MatchParen' , colors.foreground , colors.purple , styles.bold )
Group.new('Directory' , colors.foreground)
Group.new('netrwList' , colors.yellow)
@ -125,8 +126,6 @@ function M.config()
Group.new('Define' , colors.green , colors.none , styles.italic )
Group.new('Function' , colors.green , colors.none , styles.italic )
Group.new('luaFunctionCall' , groups.Function , groups.Function , groups.Function)
end
return M

View File

@ -5,7 +5,11 @@ local M = {
}
function M.config()
require("colorizer").setup()
require("colorizer").setup({
"*",
}, {
rgb_fn = true,
})
end
return M

12
lua/user/coq.lua Normal file
View File

@ -0,0 +1,12 @@
local M = {
'ms-jpq/coq_nvim',
branch = "coq",
lazy = false,
}
function M.config()
vim.api.nvim_command(":COQnow")
end
return M

View File

@ -0,0 +1,20 @@
local M = {
"lukas-reineke/indent-blankline.nvim",
lazy = false,
}
function M.config()
vim.opt.termguicolors = true
vim.cmd [[highlight IndentBlanklineIndent1 guifg=#2A2A2A gui=nocombine]]
vim.opt.list = true
require("indent_blankline").setup {
space_char_blankline = " ",
char_highlight_list = {
"IndentBlanklineIndent1",
},
}
end
return M

View File

@ -25,6 +25,7 @@ function M.config()
-- (Optional) Configure lua language server for neovim
require("lspconfig").lua_ls.setup(lsp.nvim_lua_ls())
require("lspconfig").gopls.setup {}
lsp.setup()
end

10
lua/user/neoscroll.lua Normal file
View File

@ -0,0 +1,10 @@
local M = {
"karb94/neoscroll.nvim",
lazy = false
}
function M.config()
require('neoscroll').setup()
end
return M

View File

@ -1,7 +0,0 @@
local M = {
"AlphaTechnolog/pywal.nvim",
lazy = false,
priority = 1000,
}
return M

View File

@ -9,6 +9,7 @@ M.servers = {
"bashls",
"jsonls",
"yamlls",
"gopls",
}
return M