Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for lvim with lazy #4

Merged
merged 4 commits into from
May 10, 2023
Merged
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
4 changes: 1 addition & 3 deletions .github/workflows/iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on:
push:
tags:
- "*"
workflow_dispatch:


jobs:
container:
Expand All @@ -27,4 +25,4 @@ jobs:
id: create_release
uses: softprops/action-gh-release@v1
with:
files: out/*.iso
files: out/*.iso
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "archiso/airootfs/etc/skel/.local/share/lunarvim/site/pack/packer/start/packer.nvim"]
path = archiso/airootfs/etc/skel/.local/share/lunarvim/site/pack/packer/start/packer.nvim
url = https://github.com/wbthomason/packer.nvim
[submodule "archiso/airootfs/etc/skel/.local/share/lunarvim/lvim"]
path = archiso/airootfs/etc/skel/.local/share/lunarvim/lvim
url = https://github.com/lunarvim/lunarvim
branch = release-1.2/neovim-0.8
branch = release-1.3/neovim-0.9
[submodule "archiso/airootfs/etc/skel/.local/share/lunarvim/site/pack/lazy/opt/lazy.nvim"]
path = archiso/airootfs/etc/skel/.local/share/lunarvim/site/pack/lazy/opt/lazy.nvim
url = https://github.com/folke/lazy.nvim
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ RUN repo-add -n -R local/repo/ashos-repo.db.tar.gz local/repo/*.pkg.tar.zst
COPY ./archiso ./archiso/
COPY ./justfile .
COPY ./init.sh .
ENTRYPOINT [ "./init.sh" ]
ENTRYPOINT [ "./init.sh" ]
120 changes: 8 additions & 112 deletions archiso/airootfs/etc/skel/.config/lvim/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ lvim.builtin.bufferline.options.always_show_bufferline = "true"
lvim.builtin.treesitter.rainbow.enable = true
lvim.builtin.bufferline.options.separator_style = "slant"
lvim.builtin.bufferline.options.right_mouse_command = "bdelete! %d"

-- keymappings [view all the defaults by pressing <leader>Lk]

lvim.leader = "space"
lvim.keys.insert_mode = {
["jk"] = "<Esc>",
}
vim.g.localleader = "\\"
vim.g.termguicolors = true
-- vim.set.mouse = "r"

lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
vim.o.guifont = "CartographCF Nerd Font"
vim.o.guifont = "JetBrainsMono Nerd Font"
lvim.builtin.treesitter.ensure_installed = {
"bash",
"c",
Expand All @@ -43,19 +44,17 @@ lvim.plugins = {
{ "junegunn/vim-emoji" },
{ "ggandor/lightspeed.nvim" },
{ "catppuccin/nvim",
as = "catppuccin",
run = ":CatppuccinCompile",
name = "catppuccin",
build = ":CatppuccinCompile",
config = function()
vim.g.catppuccin_flavour = "mocha"
require("catppuccin").setup()
vim.cmd "colorscheme catppuccin"
end
},
{ "andweeb/presence.nvim" },
{ "github/copilot.vim" },
{ "iamcco/markdown-preview.nvim",
run = "cd app && npm install",
setup = function() vim.g.mkdp_filetypes = { "markdown" } end, ft = { "markdown" },
build = "cd app && npm install",
init = function() vim.g.mkdp_filetypes = { "markdown" } end, ft = { "markdown" },
},
{ "fatih/vim-go" },
{ "p00f/nvim-ts-rainbow",
Expand Down Expand Up @@ -106,7 +105,7 @@ require("catppuccin").setup({
dim_inactive = {
enabled = false,
},
transparent_background = false,
transparent_background = true,
term_colors = true,
compile = {
enabled = true,
Expand Down Expand Up @@ -162,106 +161,3 @@ require("catppuccin").setup({
})
vim.cmd [[colorscheme catppuccin]]

function string.starts(self, str)
return self:find("^" .. str) ~= nil
end

local hide = function()
local home = vim.fn.expand("$HOME") .. "/Code/git/"
local dataconfig = vim.fn.expand("$HOME") .. "/.local/share/"
local configdir = vim.fn.expand("$HOME") .. "/.config/"
local blacklistDir = {
[vim.fn.resolve(home .. "Personal")] = "Breaking stuff.",
[vim.fn.resolve(configdir .. "lvim/config.lua")] = "Breaking neovim config",
[vim.fn.resolve(dataconfig .. "/lunarvim/lvim")] = "Breaking neovim config"
}

local current_file = vim.fn.expand("%:p")
for k, v in pairs(blacklistDir) do
if current_file:starts(k) then
return v
end
end
return false
end

require("presence"):setup({
auto_update = true,
neovim_image_text = "idk it just works",
main_image = "file",
-- client_id = "793271441293967371",
log_level = nil,
debounce_timeout = 10,
enable_line_number = false,
blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches

buttons = function(repo)
if repo == nil then
return false
end
local visible = {
"github.com/catppuccin",
"github.com/ghostx31",
}

for _, visible_url in ipairs(visible) do
if repo:find(visible_url) then
return {
{
label = "Checkout the repository",
url = repo,
},
}
end
end
return false
end,
editing_text = function(s)
local hidden = hide()
if hidden then
return hidden
end
return "Writing in " .. s
end,
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
vimsence_client_id = '439476230543245312',
reading_text = function(s)
local hidden = hide()
if hidden then
return hidden
end
return "Reading in " .. s
end,
file_explorer_text = function(s)
local hidden = hide()
if hidden then
return hidden
end
return "Browsing in " .. s
end,
workspace_text = function(s)
local hidden = hide()
if s ~= nil and not hidden then
return "Working in " .. s
else
return nil
end
end,
line_number_text = "Line %s out of %s", -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
})

-- require 'lspconfig'.marksman.setup {}
require("indent_blankline").setup {
show_current_context = true,
show_current_context_start = true,
space_char_blankline = " ",
char_highlight_list = {
"IndentBlanklineIndent1",
"IndentBlanklineIndent2",
"IndentBlanklineIndent3",
"IndentBlanklineIndent4",
"IndentBlanklineIndent5",
"IndentBlanklineIndent6",
},
}
4 changes: 3 additions & 1 deletion archiso/airootfs/etc/skel/.local/bin/lvim
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/env bash

export NVIM_APPNAME="${NVIM_APPNAME:-"lvim"}"

export LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-"$HOME/.local/share/lunarvim"}"
export LUNARVIM_CONFIG_DIR="${LUNARVIM_CONFIG_DIR:-"$HOME/.config/lvim"}"
export LUNARVIM_CACHE_DIR="${LUNARVIM_CACHE_DIR:-"$HOME/.cache/lvim"}"

export LUNARVIM_BASE_DIR="${LUNARVIM_BASE_DIR:-"$HOME/.local/share/lunarvim/lvim"}"

exec -a lvim nvim -u "$LUNARVIM_BASE_DIR/init.lua" "$@"
exec -a "$NVIM_APPNAME" nvim -u "$LUNARVIM_BASE_DIR/init.lua" "$@"
2 changes: 1 addition & 1 deletion archiso/airootfs/etc/skel/.local/share/lunarvim/lvim
Submodule lvim updated 79 files
+1 −4 .github/FUNDING.yml
+13 −17 .github/ISSUE_TEMPLATE/general-issue-form.yaml
+7 −6 .github/ISSUE_TEMPLATE/lsp-issue-form.yaml
+4 −2 .github/pull_request_template.md
+6 −3 .github/workflows/close-inactive-bot.yml
+6 −6 .github/workflows/format.yaml
+3 −3 .github/workflows/install.yaml
+2 −1 .github/workflows/plugins.yml
+134 −0 CHANGELOG.md
+2 −1 CONTRIBUTING.md
+0 −3 ftdetect/json.lua
+0 −1 ftdetect/plaintex.lua
+0 −3 ftdetect/zig.lua
+0 −88 ftplugin/lua.lua
+1 −3 init.lua
+11 −16 lua/lvim/bootstrap.lua
+109 −13 lua/lvim/config/_deprecated.lua
+29 −0 lua/lvim/config/defaults.lua
+18 −5 lua/lvim/config/init.lua
+37 −1 lua/lvim/config/settings.lua
+28 −24 lua/lvim/core/alpha.lua
+39 −28 lua/lvim/core/alpha/dashboard.lua
+68 −41 lua/lvim/core/autocmds.lua
+6 −14 lua/lvim/core/autopairs.lua
+34 −24 lua/lvim/core/breadcrumbs.lua
+8 −5 lua/lvim/core/bufferline.lua
+41 −30 lua/lvim/core/cmp.lua
+15 −0 lua/lvim/core/commands.lua
+6 −6 lua/lvim/core/comment.lua
+24 −2 lua/lvim/core/dap.lua
+9 −16 lua/lvim/core/gitsigns.lua
+6 −2 lua/lvim/core/illuminate.lua
+5 −4 lua/lvim/core/indentlines.lua
+26 −24 lua/lvim/core/lir.lua
+52 −66 lua/lvim/core/log.lua
+5 −9 lua/lvim/core/lualine/components.lua
+1 −1 lua/lvim/core/lualine/init.lua
+32 −1 lua/lvim/core/mason.lua
+195 −103 lua/lvim/core/nvimtree.lua
+18 −6 lua/lvim/core/project.lua
+60 −88 lua/lvim/core/telescope.lua
+3 −3 lua/lvim/core/telescope/custom-finders.lua
+13 −12 lua/lvim/core/terminal.lua
+15 −8 lua/lvim/core/theme.lua
+9 −102 lua/lvim/core/treesitter.lua
+56 −26 lua/lvim/core/which-key.lua
+95 −95 lua/lvim/icons.lua
+0 −477 lua/lvim/impatient.lua
+0 −253 lua/lvim/impatient/profile.lua
+3 −0 lua/lvim/keymappings.lua
+29 −45 lua/lvim/lsp/config.lua
+0 −19 lua/lvim/lsp/handlers.lua
+12 −10 lua/lvim/lsp/init.lua
+5 −3 lua/lvim/lsp/providers/lua_ls.lua
+8 −1 lua/lvim/lsp/providers/tailwindcss.lua
+1 −15 lua/lvim/lsp/providers/yamlls.lua
+1 −0 lua/lvim/lsp/templates.lua
+1 −0 lua/lvim/lsp/utils.lua
+86 −124 lua/lvim/plugin-loader.lua
+152 −70 lua/lvim/plugins.lua
+25 −0 lua/lvim/utils.lua
+0 −16 lua/lvim/utils/functions.lua
+10 −9 lua/lvim/utils/git.lua
+10 −20 lua/lvim/utils/hooks.lua
+24 −0 lua/lvim/utils/modules.lua
+45 −42 snapshots/default.json
+22 −19 tests/minimal_lsp.lua
+5 −4 tests/specs/lsp_spec.lua
+2 −37 tests/specs/plugins_load_spec.lua
+3 −1 utils/bin/lvim.template
+10 −1 utils/ci/generate_new_lockfile.lua
+13 −15 utils/ci/verify_plugins.lua
+1 −1 utils/docker/Dockerfile.remote
+4 −185 utils/installer/config.example.lua
+5 −179 utils/installer/config_win.example.lua
+5 −2 utils/installer/install.ps1
+35 −29 utils/installer/install.sh
+9 −7 utils/installer/install_bin.sh
+17 −11 utils/installer/uninstall.sh
Submodule packer.nvim deleted from 1d0cf9