summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2022-03-24 15:48:33 +0100
committerkylo252 <[email protected]>2022-03-24 15:48:33 +0100
commitf41edc6dfb0d2a4c9875da08bbbdab121e52048f (patch)
treec6541278c6314e58d991bc95e547e903ac58340a
parent5ee460fdc751a91cdf7a4f4aab2ab784ebdb36fd (diff)
parent1ea836e3601b7ed0ed0496888dc14683bfbcce75 (diff)
Merge remote-tracking branch 'origin/rolling'1.1.3
-rw-r--r--README.md23
-rw-r--r--colors/onedarker.vim13
-rw-r--r--lua/lualine/themes/darkplus.lua31
-rw-r--r--lua/lualine/themes/onedarker.lua31
-rw-r--r--lua/lvim/config/init.lua31
-rw-r--r--lua/lvim/core/alpha.lua83
-rw-r--r--lua/lvim/core/alpha/dashboard.lua83
-rw-r--r--lua/lvim/core/alpha/startify.lua48
-rw-r--r--lua/lvim/core/bufferline.lua2
-rw-r--r--lua/lvim/core/builtins/init.lua2
-rw-r--r--lua/lvim/core/dashboard.lua115
-rw-r--r--lua/lvim/core/lualine/init.lua9
-rw-r--r--lua/lvim/core/lualine/styles.lua16
-rw-r--r--lua/lvim/core/lualine/utils.lua13
-rw-r--r--lua/lvim/core/nvimtree.lua1
-rw-r--r--lua/lvim/core/terminal.lua3
-rw-r--r--lua/lvim/core/which-key.lua2
-rw-r--r--lua/lvim/lsp/config.lua1
-rw-r--r--lua/lvim/lsp/peek.lua16
-rw-r--r--lua/lvim/plugin-loader.lua7
-rw-r--r--lua/lvim/plugins.lua61
-rw-r--r--lua/lvim/utils/git.lua53
-rw-r--r--lua/lvim/utils/hooks.lua6
-rw-r--r--lua/onedarker/Git.lua10
-rw-r--r--lua/onedarker/LSP.lua121
-rw-r--r--lua/onedarker/Notify.lua24
-rw-r--r--lua/onedarker/Treesitter.lua66
-rw-r--r--lua/onedarker/Whichkey.lua9
-rw-r--r--lua/onedarker/config.lua23
-rw-r--r--lua/onedarker/diff.lua12
-rw-r--r--lua/onedarker/highlights.lua107
-rw-r--r--lua/onedarker/init.lua34
-rw-r--r--lua/onedarker/markdown.lua27
-rw-r--r--lua/onedarker/palette.lua45
-rw-r--r--lua/onedarker/util.lua25
-rw-r--r--utils/installer/config.example.lua3
-rw-r--r--utils/installer/install.ps12
-rwxr-xr-xutils/installer/install.sh2
-rwxr-xr-xutils/media/demo1.pngbin249203 -> 0 bytes
-rwxr-xr-xutils/media/demo2.pngbin817380 -> 0 bytes
-rwxr-xr-xutils/media/demo3.pngbin491134 -> 0 bytes
-rwxr-xr-xutils/media/lunarvim_logo_dark.pngbin90789 -> 0 bytes
42 files changed, 345 insertions, 815 deletions
diff --git a/README.md b/README.md
index 4eeed945..2e7c81d2 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-![LunarVim Demo](./utils/media/lunarvim_logo_dark.png)
+![lunarvim_logo_dark](https://user-images.githubusercontent.com/59826753/159940098-54284f26-f1da-4481-8b03-1deb34c57533.png)
<div align="center"><p>
<a href="https://github.com/lunarvim/LunarVim/releases/latest">
@@ -20,9 +20,12 @@
</div>
-## Documentation
+## Showcase
+![intro1](https://user-images.githubusercontent.com/59826753/159939936-3a9a8e94-05ea-48fa-8c46-69378276451b.png)
+![info](https://user-images.githubusercontent.com/59826753/159939984-ac0190d7-a3fb-46c0-95ca-a6fec626bbac.png)
-You can find all the documentation for LunarVim at [lunarvim.org](https://www.lunarvim.org)
+![demo1](https://user-images.githubusercontent.com/59826753/159940004-84975294-5703-4bf1-aa98-2cc97cb38d96.png)
+![demo2](https://user-images.githubusercontent.com/59826753/159940040-375a0a28-4c81-4fdf-80f2-62853edf9b4f.png)
## Install In One Command!
@@ -44,17 +47,9 @@ The same way, you can use `--no-install-dependencies` to skip the dependency ins
Invoke-WebRequest https://raw.githubusercontent.com/LunarVim/LunarVim/master/utils/installer/install.ps1 -UseBasicParsing | Invoke-Expression
```
-## Install Language support
+## Automatic LSP support
-- Enter `:LspInstall` followed by `<TAB>` to see your options for LSP
-
-- Enter `:TSInstall` followed by `<TAB>` to see your options for syntax highlighting
-
-**NOTE** I recommend installing `lua` for autocomplete in `config.lua`
-
-![Demo1](./utils/media/demo1.png)
-![Demo2](./utils/media/demo2.png)
-![Demo3](./utils/media/demo3.png)
+By default, most supported language servers will get automatically installed once you open the supported file-type, e.g, opening a Python file for the first time will install `Pyright` and configure it automatically for you.
## Configuration file
@@ -118,7 +113,6 @@ linters.setup {
},
}
-
-- Additional Plugins
lvim.plugins = {
{"lunarvim/colorschemes"},
@@ -143,6 +137,7 @@ lvim.plugins = {
- `lvim.lang.FOO` is no longer supported. Refer to <https://www.lunarvim.org/languages> for up-to-date instructions.
- `lvim.lsp.popup_border` has been deprecated in favor of `lvim.lsp.float.border` and `lvim.lsp.diagnostics.float.border`.
+- `lvim.builtin.dashboard` has been replaced with `lvim.builtin.alpha`, see <https://github.com/LunarVim/LunarVim/pull/1906>
## Resources
diff --git a/colors/onedarker.vim b/colors/onedarker.vim
deleted file mode 100644
index 42f2dbcb..00000000
--- a/colors/onedarker.vim
+++ /dev/null
@@ -1,13 +0,0 @@
-" Author: Christian Chiarulli <[email protected]>
-
-lua << EOF
-package.loaded['onedarker'] = nil
-package.loaded['onedarker.highlights'] = nil
-package.loaded['onedarker.Treesitter'] = nil
-package.loaded['onedarker.markdown'] = nil
-package.loaded['onedarker.Whichkey'] = nil
-package.loaded['onedarker.Git'] = nil
-package.loaded['onedarker.LSP'] = nil
-
-require("onedarker")
-EOF
diff --git a/lua/lualine/themes/darkplus.lua b/lua/lualine/themes/darkplus.lua
deleted file mode 100644
index 8e710d1f..00000000
--- a/lua/lualine/themes/darkplus.lua
+++ /dev/null
@@ -1,31 +0,0 @@
-local colors = {
- blue = "#569cd6",
- green = "#6a9955",
- purple = "#c586c0",
- red = "#d16969",
- yellow = "#dcdcaa",
- yellow_orange = "#d7ba7d",
- orange = "#ce9178",
- fg = "#b4b4b4",
- bg = "#252525",
- gray1 = "#252525",
- gray2 = "#252525",
- gray3 = "#252525",
-}
-
-return {
- normal = {
- a = { fg = colors.fg, bg = colors.blue, gui = "bold" },
- b = { fg = colors.fg, bg = colors.bg },
- c = { fg = colors.fg, bg = colors.bg },
- },
- insert = { a = { fg = colors.fg, bg = colors.green, gui = "bold" } },
- visual = { a = { fg = colors.fg, bg = colors.purple, gui = "bold" } },
- command = { a = { fg = colors.fg, bg = colors.cyan, gui = "bold" } },
- replace = { a = { fg = colors.fg, bg = colors.red, gui = "bold" } },
- inactive = {
- a = { fg = colors.gray1, bg = colors.bg, gui = "bold" },
- b = { fg = colors.gray1, bg = colors.bg },
- c = { fg = colors.gray1, bg = colors.bg },
- },
-}
diff --git a/lua/lualine/themes/onedarker.lua b/lua/lualine/themes/onedarker.lua
deleted file mode 100644
index 7db197ab..00000000
--- a/lua/lualine/themes/onedarker.lua
+++ /dev/null
@@ -1,31 +0,0 @@
-local colors = {
- blue = "#61afef",
- green = "#98c379",
- purple = "#c678dd",
- red1 = "#e06c75",
- red2 = "#be5046",
- yellow = "#e5c07b",
- orange = "#D19A66",
- fg = "#abb2bf",
- bg = "#282c34",
- gray1 = "#5c6370",
- gray2 = "#2c323d",
- gray3 = "#3e4452",
-}
-
-return {
- normal = {
- a = { fg = colors.gray2, bg = colors.blue, gui = "bold" },
- b = { fg = colors.fg, bg = colors.bg },
- c = { fg = colors.fg, bg = colors.bg },
- },
- insert = { a = { fg = colors.gray2, bg = colors.green, gui = "bold" } },
- visual = { a = { fg = colors.gray2, bg = colors.purple, gui = "bold" } },
- command = { a = { fg = colors.gray2, bg = colors.yellow, gui = "bold" } },
- replace = { a = { fg = colors.gray2, bg = colors.red1, gui = "bold" } },
- inactive = {
- a = { fg = colors.gray1, bg = colors.bg, gui = "bold" },
- b = { fg = colors.gray1, bg = colors.bg },
- c = { fg = colors.gray1, bg = colors.bg },
- },
-}
diff --git a/lua/lvim/config/init.lua b/lua/lvim/config/init.lua
index de06aa89..c3fe0438 100644
--- a/lua/lvim/config/init.lua
+++ b/lua/lvim/config/init.lua
@@ -40,20 +40,33 @@ function M:init()
local lvim_lsp_config = require "lvim.lsp.config"
lvim.lsp = apply_defaults(lvim.lsp, vim.deepcopy(lvim_lsp_config))
+ ---@deprecated replaced with lvim.builtin.alpha
+ lvim.builtin.dashboard = {
+ active = false,
+ on_config_done = nil,
+ search_handler = "",
+ disable_at_vim_enter = 0,
+ session_directory = "",
+ custom_header = {},
+ custom_section = {},
+ footer = {},
+ }
+
require("lvim.lsp.manager").init_defaults()
end
local function handle_deprecated_settings()
- local function deprecation_notice(setting)
+ local function deprecation_notice(setting, msg)
local in_headless = #vim.api.nvim_list_uis() == 0
if in_headless then
return
end
- local msg = string.format(
- "Deprecation notice: [%s] setting is no longer supported. See https://github.com/LunarVim/LunarVim#breaking-changes",
- setting
- )
+ msg = msg
+ or string.format(
+ "Deprecation notice: [%s] setting is no longer supported. See https://github.com/LunarVim/LunarVim#breaking-changes",
+ setting
+ )
vim.schedule(function()
Log:warn(msg)
end)
@@ -71,6 +84,14 @@ local function handle_deprecated_settings()
if vim.tbl_contains(vim.tbl_keys(lvim.lsp), "popup_border") then
deprecation_notice "lvim.lsp.popup_border"
end
+
+ -- dashboard.nvim
+ if lvim.builtin.dashboard.active then
+ deprecation_notice(
+ "dashboard",
+ "Deprecation notice: `lvim.builtin.dashboard` has been replaced with `lvim.builtin.alpha`. See LunarVim#1906"
+ )
+ end
end
--- Override the configuration with a user provided one
diff --git a/lua/lvim/core/alpha.lua b/lua/lvim/core/alpha.lua
new file mode 100644
index 00000000..7612854b
--- /dev/null
+++ b/lua/lvim/core/alpha.lua
@@ -0,0 +1,83 @@
+local M = {}
+
+function M.config()
+ local lvim_dashboard = require "lvim.core.alpha.dashboard"
+ local lvim_startify = require "lvim.core.alpha.startify"
+ lvim.builtin.alpha = {
+ dashboard = { config = {}, section = lvim_dashboard.get_sections() },
+ startify = { config = {}, section = lvim_startify.get_sections() },
+ active = true,
+ mode = "dashboard",
+ }
+end
+
+local function resolve_buttons(theme_name, entries)
+ local selected_theme = require("alpha.themes." .. theme_name)
+ local val = {}
+ for _, entry in pairs(entries) do
+ local on_press = function()
+ local sc_ = entry[1]:gsub("%s", ""):gsub("SPC", "<leader>")
+ local key = vim.api.nvim_replace_termcodes(sc_, true, false, true)
+ vim.api.nvim_feedkeys(key, "normal", false)
+ end
+ local button_element = selected_theme.button(entry[1], entry[2], entry[3])
+ -- this became necessary after recent changes in alpha.nvim (06ade3a20ca9e79a7038b98d05a23d7b6c016174)
+ button_element.on_press = on_press
+ table.insert(val, button_element)
+ end
+ return val
+end
+
+local function resolve_config(theme_name)
+ local selected_theme = require("alpha.themes." .. theme_name)
+ local resolved_section = selected_theme.section
+ local section = lvim.builtin.alpha[theme_name].section
+
+ for name, el in pairs(section) do
+ for k, v in pairs(el) do
+ if name:match "buttons" and k == "entries" then
+ resolved_section[name].val = resolve_buttons(theme_name, v)
+ elseif v then
+ resolved_section[name][k] = v
+ end
+ end
+ end
+
+ return selected_theme.config
+end
+
+local function configure_additional_autocmds()
+ local aucmds = {
+ {
+ "FileType",
+ "alpha",
+ "set showtabline=0 | autocmd BufLeave <buffer> set showtabline=" .. vim.opt.showtabline._value,
+ },
+ }
+ if not lvim.builtin.lualine.options.globalstatus then
+ aucmds[#aucmds + 1] =
+ -- https://github.com/goolord/alpha-nvim/issues/42
+ {
+ "FileType",
+ "alpha",
+ "set laststatus=0 | autocmd BufUnload <buffer> set laststatus=" .. vim.opt.laststatus._value,
+ }
+ end
+ require("lvim.core.autocmds").define_augroups { _alpha = aucmds }
+end
+
+function M.setup()
+ local alpha = require "alpha"
+ local mode = lvim.builtin.alpha.mode
+ local config = lvim.builtin.alpha[mode].config
+
+ -- this makes it easier to use a completely custom configuration
+ if vim.tbl_isempty(config) then
+ config = resolve_config(mode)
+ end
+
+ alpha.setup(config)
+ configure_additional_autocmds()
+end
+
+return M
diff --git a/lua/lvim/core/alpha/dashboard.lua b/lua/lvim/core/alpha/dashboard.lua
new file mode 100644
index 00000000..010d8c1a
--- /dev/null
+++ b/lua/lvim/core/alpha/dashboard.lua
@@ -0,0 +1,83 @@
+local M = {}
+
+function M.get_sections()
+ local header = {
+ type = "text",
+ val = {
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣶⣶⣶⣶⣶⣶⣶⣦⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣴⣾⣿⠿⠛⠛⠉⠉⠉⠉⠉⠉⠉⠙⠛⠻⢿⣿⣶⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⠿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠻⢿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠈⠉⠉⠉⠉⠉⣹⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⠀⣰⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⠀⠀⠀⠀⢰⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⡀⠀⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢺⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠉⠑⠢⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡇⠀⠀⠀⠈⠑⠢⠄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⠢⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣇⠀⠀⠀⠀⠀⠀⠀⠀⠉⠐⠢⠄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⡟⠀⠈⠑⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⠒⠠⠤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⠁⠀⠀⢀⣼⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠁⠒⠂⠤⠤⠀⣀⡀⠀⠀⠀⣼⣿⠇⠀⠀⢀⣸⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠀⣿⡟⠀⠀⠀⠀⠀⠀⣤⡄⠀⠀⠀⣠⣤⠀⠀⢠⣭⣀⣤⣤⣤⡀⠀⠀⠀⢀⣤⣤⣤⣤⡀⠀⠀⠀⢠⣤⢀⣤⣤⣄⠀⠀⣿⣿⠀⠉⣹⣿⠏⠉⠉⢱⣶⣶⣶⡦⠀⠀⠀⢠⣶⣦⣴⣦⣠⣴⣦⡀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⢠⣿⡇⠀⠀⠀⠀⠀⢠⣿⠇⠀⠀⠀⣿⡇⠀⠀⣿⡿⠉⠀⠈⣿⣧⠀⠀⠰⠿⠋⠀⠀⢹⣿⠀⠀⠀⣿⡿⠋⠀⠹⠿⠀⠀⢻⣿⡇⢠⣿⡟⠀⠀⠀⠈⠉⢹⣿⡇⠀⠀⠀⢸⣿⡏⢹⣿⡏⢹⣿⡇⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⢰⣿⠃⠀⢠⣿⡇⠀⠀⠀⣿⡇⠀⠀⣠⣴⡶⠶⠶⣿⣿⠀⠀⢠⣿⡇⠀⠀⠀⠀⠀⠀⢸⣿⣇⣿⡿⠀⠀⠀⠀⠀⠀⣿⣿⠁⠀⠀⠀⣿⣿⠀⣾⣿⠀⣾⣿⠁⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⣿⣟⠀⠀⠀⠀⠀⠀⢻⣿⡀⠀⢀⣼⣿⠀⠀⢸⣿⠀⠀⠀⢰⣿⠇⠀⢰⣿⣇⠀⠀⣠⣿⡏⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⠁⠀⠀⠀⣀⣀⣠⣿⣿⣀⡀⠀⢠⣿⡟⢠⣿⡟⢀⣿⡿⠀⠀⠀⠀⠀",
+ "⠀⠀⠀⠀⠀⠛⠛⠛⠛⠛⠛⠁⠀⠈⠛⠿⠟⠋⠛⠃⠀⠀⠛⠛⠀⠀⠀⠘⠛⠀⠀⠀⠙⠿⠿⠛⠙⠛⠃⠀⠀⠚⠛⠀⠀⠀⠀⠀⠀⠀⠘⠿⠿⠃⠀⠀⠀⠀⠿⠿⠿⠿⠿⠿⠿⠀⠸⠿⠇⠸⠿⠇⠸⠿⠇⠀⠀⠀⠀⠀",
+ " ",
+ },
+ opts = {
+ position = "center",
+ hl = "Label",
+ },
+ }
+
+ local text = require "lvim.interface.text"
+ local git_utils = require "lvim.utils.git"
+
+ local current_branch = git_utils.get_lvim_branch()
+
+ local lvim_version
+ if current_branch ~= "HEAD" or "" then
+ lvim_version = current_branch .. "-" .. git_utils.get_lvim_current_sha()
+ else
+ lvim_version = "v" .. git_utils.get_lvim_tag()
+ end
+
+ local footer = {
+ type = "text",
+ val = text.align_center({ width = 0 }, {
+ "",
+ "lunarvim.org",
+ lvim_version,
+ }, 0.5),
+ opts = {
+ position = "center",
+ hl = "Number",
+ },
+ }
+
+ local buttons = {
+ entries = {
+ { "SPC f", " Find File", "<CMD>Telescope find_files<CR>" },
+ { "SPC n", " New File", "<CMD>ene!<CR>" },
+ { "SPC P", " Recent Projects ", "<CMD>Telescope projects<CR>" },
+ { "SPC s r", " Recently Used Files", "<CMD>Telescope oldfiles<CR>" },
+ { "SPC s t", " Find Word", "<CMD>Telescope live_grep<CR>" },
+ {
+ "SPC L c",
+ " Configuration",
+ "<CMD>edit " .. require("lvim.config").get_user_config_path() .. " <CR>",
+ },
+ },
+ }
+
+ return {
+ header = header,
+ buttons = buttons,
+ footer = footer,
+ }
+end
+
+return M
diff --git a/lua/lvim/core/alpha/startify.lua b/lua/lvim/core/alpha/startify.lua
new file mode 100644
index 00000000..2ea541f5
--- /dev/null
+++ b/lua/lvim/core/alpha/startify.lua
@@ -0,0 +1,48 @@
+local M = {}
+
+function M.get_sections()
+ local header = {
+ type = "text",
+ val = {
+ [[ __ _ ___ ]],
+ [[ / / __ ______ ____ _____| | / (_)___ ___ ]],
+ [[ / / / / / / __ \/ __ `/ ___/ | / / / __ `__ \]],
+ [[ / /___/ /_/ / / / / /_/ / / | |/ / / / / / / /]],
+ [[/_____/\__,_/_/ /_/\__,_/_/ |___/_/_/ /_/ /_/ ]],
+ },
+ opts = {
+ hl = "Label",
+ shrink_margin = false,
+ -- wrap = "overflow";
+ },
+ }
+
+ local top_buttons = {
+ entries = {
+ { "e", " New File", "<CMD>ene!<CR>" },
+ },
+ val = {},
+ }
+
+ local bottom_buttons = {
+ entries = {
+ { "q", "Quit", "<CMD>quit<CR>" },
+ },
+ val = {},
+ }
+
+ local footer = {
+ type = "group",
+ val = {},
+ }
+
+ return {
+ header = header,
+ top_buttons = top_buttons,
+ bottom_buttons = bottom_buttons,
+ -- this is probably broken
+ footer = footer,
+ }
+end
+
+return M
diff --git a/lua/lvim/core/bufferline.lua b/lua/lvim/core/bufferline.lua
index c7b5fd2d..d16c3d79 100644
--- a/lua/lvim/core/bufferline.lua
+++ b/lua/lvim/core/bufferline.lua
@@ -9,7 +9,7 @@ local function diagnostics_indicator(_, _, diagnostics)
local symbols = { error = "", warning = "", info = "" }
for name, count in pairs(diagnostics) do
if symbols[name] and count > 0 then
- table.insert(result, symbols[name] .. count)
+ table.insert(result, symbols[name] .. " " .. count)
end
end
result = table.concat(result, " ")
diff --git a/lua/lvim/core/builtins/init.lua b/lua/lvim/core/builtins/init.lua
index cd47b638..e219d45e 100644
--- a/lua/lvim/core/builtins/init.lua
+++ b/lua/lvim/core/builtins/init.lua
@@ -4,7 +4,6 @@ local builtins = {
"lvim.core.which-key",
"lvim.core.gitsigns",
"lvim.core.cmp",
- "lvim.core.dashboard",
"lvim.core.dap",
"lvim.core.terminal",
"lvim.core.telescope",
@@ -16,6 +15,7 @@ local builtins = {
"lvim.core.comment",
"lvim.core.notify",
"lvim.core.lualine",
+ "lvim.core.alpha",
}
function M.config(config)
diff --git a/lua/lvim/core/dashboard.lua b/lua/lvim/core/dashboard.lua
deleted file mode 100644
index 438b46f3..00000000
--- a/lua/lvim/core/dashboard.lua
+++ /dev/null
@@ -1,115 +0,0 @@
-local M = {}
-local utils = require "lvim.utils"
-
-M.config = function(config)
- lvim.builtin.dashboard = {
- active = false,
- on_config_done = nil,
- search_handler = "telescope",
- disable_at_vim_enter = 0,
- session_directory = utils.join_paths(get_cache_dir(), "sessions"),
- custom_header = {
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- " ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⡿⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠂⠉⠉⠉⠉⢩⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⢰⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠠⡀⠀⠀⢀⣾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⢀⣸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡧⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠈⠁⠒⠤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣇⠀⠀⠀⠀⠀⠀⠉⠢⠤⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠈⠑⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠑⠒⠤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⡇⠀⠀⢀⣣⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠒⠢⠤⠄⣀⣀⠀⠀⠀⢠⣿⡟⠀⠀⠀⣺⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
- "⠀⣿⠇⠀⠀⠀⠀⠀⣤⡄⠀⠀⢠⣤⡄⠀⢨⣭⣠⣤⣤⣤⡀⠀⠀⢀⣤⣤⣤⣤⡄⠀⠀⠀⣤⣄⣤⣤⣤⠀⠀⣿⣯⠉⠉⣿⡟⠀⠈⢩⣭⣤⣤⠀⠀⠀⠀⣠⣤⣤⣤⣄⣤⣤",
- "⢠⣿⠀⠀⠀⠀⠀⠀⣿⠃⠀⠀⣸⣿⠁⠀⣿⣿⠉⠀⠈⣿⡇⠀⠀⠛⠋⠀⠀⢹⣿⠀⠀⠀⣿⠏⠀⠸⠿⠃⠀⣿⣿⠀⣰⡟⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡟⢸⣿⡇⢀⣿",
- "⣸⡇⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⣿⡟⠀⢠⣿⡇⠀⠀⢰⣿⡇⠀⣰⣾⠟⠛⠛⣻⡇⠀⠀⢸⡿⠀⠀⠀⠀⠀⠀⢻⣿⢰⣿⠀⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⢸⣿⠇⢸⣿⠀⢸⡏",
- "⣿⣧⣤⣤⣤⡄⠀⠘⣿⣤⣤⡤⣿⠇⠀⢸⣿⠁⠀⠀⣼⣿⠀⠀⢿⣿⣤⣤⠔⣿⠃⠀⠀⣾⡇⠀⠀⠀⠀⠀⠀⢸⣿⣿⠋⠀⠀⠀⢠⣤⣤⣿⣥⣤⡄⠀⣼⣿⠀⣸⡏⠀⣿⠃",
- "⠉⠉⠉⠉⠉⠁⠀⠀⠈⠉⠉⠀⠉⠀⠀⠈⠉⠀⠀⠀⠉⠉⠀⠀⠀⠉⠉⠁⠈⠉⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠉⠁⠀⠉⠁⠀⠉⠀",
- },
-
- custom_section = {
- a = {
- description = { " Find File " },
- command = "Telescope find_files",
- },
- b = {
- description = { " New File " },
- command = ":ene!",
- },
- c = {
- description = { " Recent Projects " },
- command = "Telescope projects",
- },
- d = {
- description = { " Recently Used Files" },
- command = "Telescope oldfiles",
- },
- e = {
- description = { " Find Word " },
- command = "Telescope live_grep",
- },
- f = {
- description = { " Configuration " },
- command = ":e " .. config.user_config_file,
- },
- },
-
- footer = { "lunarvim.org" },
- }
- lvim.builtin.which_key.mappings[";"] = { "<cmd>Dashboard<CR>", "Dashboard" }
-end
-
-M.setup = function()
- vim.g.dashboard_disable_at_vimenter = lvim.builtin.dashboard.disable_at_vim_enter
-
- vim.g.dashboard_custom_header = lvim.builtin.dashboard.custom_header
-
- vim.g.dashboard_default_executive = lvim.builtin.dashboard.search_handler
-
- vim.g.dashboard_custom_section = lvim.builtin.dashboard.custom_section
-
- vim.g.dashboard_session_directory = lvim.builtin.dashboard.session_directory
-
- local lvim_site = "lunarvim.org"
- local lvim_version = require("lvim.utils.git"):get_lvim_version "short"
- local num_plugins_loaded = #vim.fn.globpath(get_runtime_dir() .. "/site/pack/packer/start", "*", 0, 1)
-
- local footer = {
- "LunarVim loaded " .. num_plugins_loaded .. " plugins ",
- "",
- lvim_site,
- }
-
- if lvim_version then
- table.insert(footer, 2, "")
- table.insert(footer, 2, lvim_version)
- end
-
- local text = require "lvim.interface.text"
- vim.g.dashboard_custom_footer = text.align_center({ width = 0 }, footer, 0.49) -- Use 0.49 as  counts for 2 characters
-
- require("lvim.core.autocmds").define_augroups {
- _dashboard = {
- -- seems to be nobuflisted that makes my stuff disappear will do more testing
- {
- "FileType",
- "dashboard",
- "setlocal nocursorline noswapfile synmaxcol& signcolumn=no norelativenumber nocursorcolumn nospell nolist nonumber bufhidden=wipe colorcolumn= foldcolumn=0 matchpairs= ",
- },
- {
- "FileType",
- "dashboard",
- "set showtabline=0 | autocmd BufLeave <buffer> set showtabline=" .. vim.opt.showtabline._value,
- },
- { "FileType", "dashboard", "nnoremap <silent> <buffer> q :q<CR>" },
- },
- }
-
- if lvim.builtin.dashboard.on_config_done then
- lvim.builtin.dashboard.on_config_done()
- end
-end
-
-return M
diff --git a/lua/lvim/core/lualine/init.lua b/lua/lvim/core/lualine/init.lua
index c5d024c2..e041e8a8 100644
--- a/lua/lvim/core/lualine/init.lua
+++ b/lua/lvim/core/lualine/init.lua
@@ -9,6 +9,7 @@ M.config = function()
section_separators = nil,
theme = nil,
disabled_filetypes = nil,
+ globalstatus = false,
},
sections = {
lualine_a = nil,
@@ -33,8 +34,14 @@ M.config = function()
end
M.setup = function()
+ -- avoid running in headless mode since it's harder to detect failures
+ if #vim.api.nvim_list_uis() == 0 then
+ local Log = require "lvim.core.log"
+ Log:debug "headless mode detected, skipping running setup for lualine"
+ return
+ end
+
require("lvim.core.lualine.styles").update()
- require("lvim.core.lualine.utils").validate_theme()
local lualine = require "lualine"
lualine.setup(lvim.builtin.lualine)
diff --git a/lua/lvim/core/lualine/styles.lua b/lua/lvim/core/lualine/styles.lua
index 0843aead..45c6c639 100644
--- a/lua/lvim/core/lualine/styles.lua
+++ b/lua/lvim/core/lualine/styles.lua
@@ -10,6 +10,7 @@ local styles = {
styles.none = {
style = "none",
options = {
+ theme = "auto",
icons_enabled = true,
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
@@ -38,6 +39,7 @@ styles.none = {
styles.default = {
style = "default",
options = {
+ theme = "auto",
icons_enabled = true,
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
@@ -66,10 +68,11 @@ styles.default = {
styles.lvim = {
style = "lvim",
options = {
+ theme = "auto",
icons_enabled = true,
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
- disabled_filetypes = { "dashboard", "NvimTree", "Outline" },
+ disabled_filetypes = { "alpha", "NvimTree", "Outline" },
},
sections = {
lualine_a = {
@@ -113,10 +116,10 @@ function M.get_style(style)
if not vim.tbl_contains(style_keys, style) then
local Log = require "lvim.core.log"
Log:error(
- "Invalid lualine style",
- string.format('"%s"', style),
- "options are: ",
- string.format('"%s"', table.concat(style_keys, '", "'))
+ "Invalid lualine style"
+ .. string.format('"%s"', style)
+ .. "options are: "
+ .. string.format('"%s"', table.concat(style_keys, '", "'))
)
Log:debug '"lvim" style is applied.'
style = "lvim"
@@ -127,9 +130,6 @@ end
function M.update()
local style = M.get_style(lvim.builtin.lualine.style)
- if lvim.builtin.lualine.options.theme == nil then
- lvim.builtin.lualine.options.theme = lvim.colorscheme
- end
lvim.builtin.lualine = vim.tbl_deep_extend("keep", lvim.builtin.lualine, style)
end
diff --git a/lua/lvim/core/lualine/utils.lua b/lua/lvim/core/lualine/utils.lua
index cf80a99e..3fd3c2d3 100644
--- a/lua/lvim/core/lualine/utils.lua
+++ b/lua/lvim/core/lualine/utils.lua
@@ -1,18 +1,5 @@
local M = {}
-function M.validate_theme()
- local theme = lvim.builtin.lualine.options.theme
- if type(theme) == "table" then
- return
- end
-
- local lualine_loader = require "lualine.utils.loader"
- local ok = pcall(lualine_loader.load_theme, theme)
- if not ok then
- lvim.builtin.lualine.options.theme = "auto"
- end
-end
-
function M.env_cleanup(venv)
if string.find(venv, "/") then
local final_venv = venv
diff --git a/lua/lvim/core/nvimtree.lua b/lua/lvim/core/nvimtree.lua
index 6b6997ca..bcdf963d 100644
--- a/lua/lvim/core/nvimtree.lua
+++ b/lua/lvim/core/nvimtree.lua
@@ -79,6 +79,7 @@ function M.config()
global = false,
},
open_file = {
+ resize_window = true,
quit_on_open = false,
},
window_picker = {
diff --git a/lua/lvim/core/terminal.lua b/lua/lvim/core/terminal.lua
index 441ab61e..69492a57 100644
--- a/lua/lvim/core/terminal.lua
+++ b/lua/lvim/core/terminal.lua
@@ -88,12 +88,11 @@ M.add_exec = function(opts)
term_mode = { [opts.keymap] = exec_func },
}
- local wk_status_ok, wk = pcall(require, "whichkey")
+ local wk_status_ok, wk = pcall(require, "which-key")
if not wk_status_ok then
return
end
wk.register({ [opts.keymap] = { opts.label } }, { mode = "n" })
- wk.register({ [opts.keymap] = { opts.label } }, { mode = "t" })
end
M._exec_toggle = function(opts)
diff --git a/lua/lvim/core/which-key.lua b/lua/lvim/core/which-key.lua
index f169a234..52b7a9ab 100644
--- a/lua/lvim/core/which-key.lua
+++ b/lua/lvim/core/which-key.lua
@@ -64,6 +64,7 @@ M.config = function()
["/"] = { "<ESC><CMD>lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())<CR>", "Comment" },
},
mappings = {
+ [";"] = { "<cmd>Alpha<CR>", "Dashboard" },
["w"] = { "<cmd>w!<CR>", "Save" },
["q"] = { "<cmd>q!<CR>", "Quit" },
["/"] = { "<cmd>lua require('Comment.api').toggle_current_linewise()<CR>", "Comment" },
@@ -167,6 +168,7 @@ M.config = function()
"<cmd>Telescope lsp_dynamic_workspace_symbols<cr>",
"Workspace Symbols",
},
+ e = { "<cmd>Telescope quickfix<cr>", "Telescope Quickfix" },
},
L = {
name = "+LunarVim",
diff --git a/lua/lvim/lsp/config.lua b/lua/lvim/lsp/config.lua
index 72a1941f..ca6f66bb 100644
--- a/lua/lvim/lsp/config.lua
+++ b/lua/lvim/lsp/config.lua
@@ -83,6 +83,7 @@ return {
"psalm",
"pylsp",
"quick_lint_js",
+ "reason_ls",
"remark_ls",
"rome",
"scry",
diff --git a/lua/lvim/lsp/peek.lua b/lua/lvim/lsp/peek.lua
index f006f934..eb774a77 100644
--- a/lua/lvim/lsp/peek.lua
+++ b/lua/lvim/lsp/peek.lua
@@ -32,8 +32,13 @@ local function create_floating_file(location, opts)
math.min(range["end"].line + 1 + (opts.context or 10), range.start.line + (opts.max_height or 15)), -- Don't let the window be more that 15 lines long(height)
false
)
+ if next(contents) == nil then
+ vim.notify("peek: Unable to get contents of the file!", vim.log.levels.WARN)
+ return
+ end
local width, height = vim.lsp.util._make_floating_popup_size(contents, opts)
- opts = vim.lsp.util.make_floating_popup_options(width, height, opts)
+ local if_nil = vim.F.if_nil
+ opts = vim.lsp.util.make_floating_popup_options(if_nil(width, 30), if_nil(height, 10), opts)
-- Don't make it minimal as it is meant to be fully featured
opts["style"] = nil
@@ -81,7 +86,7 @@ function M.open_file()
local filepath = vim.fn.expand "%:."
if not filepath then
- print "peek: Unable to open the file!"
+ vim.notify("peek: Unable to open the file!", vim.log.levels.ERROR)
return
end
@@ -114,7 +119,7 @@ function M.Peek(what)
if vim.tbl_contains(vim.api.nvim_list_wins(), M.floating_win) then
local success_1, _ = pcall(vim.api.nvim_set_current_win, M.floating_win)
if not success_1 then
- print "peek: You cannot edit the current file in a preview!"
+ vim.notify("peek: You cannot edit the current file in a preview!", vim.log.levels.ERROR)
return
end
@@ -134,8 +139,9 @@ function M.Peek(what)
local preview_callback = preview_location_callback_new_signature
local success, _ = pcall(vim.lsp.buf_request, 0, "textDocument/" .. what, params, preview_callback)
if not success then
- print(
- 'peek: Error calling LSP method "textDocument/' .. what .. '". The current language lsp might not support it.'
+ vim.notify(
+ 'peek: Error calling LSP method "textDocument/' .. what .. '". The current language lsp might not support it.',
+ vim.log.levels.ERROR
)
end
end
diff --git a/lua/lvim/plugin-loader.lua b/lua/lvim/plugin-loader.lua
index 0fbe9971..5208d5bf 100644
--- a/lua/lvim/plugin-loader.lua
+++ b/lua/lvim/plugin-loader.lua
@@ -88,15 +88,14 @@ function plugin_loader.load(configurations)
end
end
end)
+ -- colorscheme must get called after plugins are loaded or it will break new installs.
+ vim.g.colors_name = lvim.colorscheme
+ vim.cmd("colorscheme " .. lvim.colorscheme)
end, debug.traceback)
if not status_ok then
Log:warn "problems detected while loading plugins' configurations"
Log:trace(debug.traceback())
end
-
- -- Colorscheme must get called after plugins are loaded or it will break new installs.
- vim.g.colors_name = lvim.colorscheme
- vim.cmd("colorscheme " .. lvim.colorscheme)
end
function plugin_loader.get_core_plugins()
diff --git a/lua/lvim/plugins.lua b/lua/lvim/plugins.lua
index bd788f1d..d7ecdccb 100644
--- a/lua/lvim/plugins.lua
+++ b/lua/lvim/plugins.lua
@@ -1,40 +1,41 @@
local commit = {
- bufferline = "871495d9e2dbe3314a421fd2d5e46f47de7ee537",
+ alpha_nvim = "14be0ac200f44009672046123c6fcb30724018a5",
+ bufferline = "5e101b1b4e1ea5b868b8865a5f749b0b5b8f3ccd",
cmp_buffer = "d66c4c2d376e5be99db68d2362cd94d250987525",
cmp_luasnip = "d6f837f4e8fe48eeae288e638691b91b97d1737f",
cmp_nvim_lsp = "ebdfc204afb87f15ce3d3d3f5df0b8181443b5ba",
cmp_path = "466b6b8270f7ba89abd59f402c73f63c7331ff6e",
- comment = "00ed8f612b7bcbaf9df870781ed372ee8c00d6a8",
+ comment = "a841f73523440c4f32d39f0290cf1e691311db2a",
dapinstall = "24923c3819a450a772bb8f675926d530e829665f",
- dashboard_nvim = "d82ddae95fd4dc4c3b7bbe87f09b1840fbf20ecb",
fixcursorhold = "1bfb32e7ba1344925ad815cb0d7f901dbc0ff7c1",
friendly_snippets = "ad07b2844021b20797adda5b483265802559a693",
- gitsigns = "779f4eb59047ef7faa41e71d261d041edfabfb39",
+ gitsigns = "2df360de757c39c04076cb04bcbbd361dec3c8c2",
lua_dev = "a0ee77789d9948adce64d98700cc90cecaef88d5",
- lualine = "d2e0ac595b8e315b454f4384edb2eba7807a8401",
- luasnip = "3d544b66c0ded7c01151559a83bd3ff9be6a40e8",
- nlsp_settings = "61d95800be78ecea8e16297f36fef52c412d3602",
- null_ls = "15d3aabc2b440293ecf6c85f25ca9fa645a468ae",
- nvim_autopairs = "d2cde7c5802b34d6391a8a3555a3b7b56482f2aa",
- nvim_cmp = "1001683bee3a52a7b7e07ba9d391472961739c7b",
- nvim_dap = "edb22a824e33f5244c98dbaa91f749f0d6390a94",
- nvim_lsp_installer = "6e6d75b7a446a13ec2bdaaf7934c071936ad3d8c",
- nvim_lspconfig = "cf2fc1d5149dc097e8c02c607f0f0c97c5099ae8",
+ lualine = "181b14348f513e6f9eb3bdd2252e13630094fdd3",
+ luasnip = "ee350179f842699a42b3d6277b2ded8ce73bdc33",
+ nlsp_settings = "ea9b88e289359843c3cc5bfbf42e5ed9cc3df5f2",
+ null_ls = "041601cb03daa8982c5af6edc6641f4b97e9d6b5",
+ nvim_autopairs = "6617498bea01c9c628406d7e23030da57f2f8718",
+ nvim_cmp = "71d7f46b930bf08e982925c77bd9b0a9808c1162",
+ nvim_dap = "3d0575a777610b364fea745b85ad497d56b8009a",
+ nvim_lsp_installer = "dc783087bef65cc7c2943d8641ff1b6dfff6e5a9",
+ nvim_lspconfig = "710deb04d9f8b73517e1d995a57a1505cbbaac51",
nvim_notify = "f81b48d298c0ff7479b66568d9cc1a4794c196d0",
- nvim_tree = "ac858a28a2ca673bbca74af005442e58e015f19e",
- nvim_treesitter = "cada76c4901e2389c0f82ac11d0c9c61d5205e90",
+ nvim_tree = "20797a8d74e68bce50b98455c76c5de250c6f0e5",
+ nvim_treesitter = "fd92e70c69330dd8f2f6753d3d987c34e7dacd24",
nvim_ts_context_commentstring = "097df33c9ef5bbd3828105e4bee99965b758dc3f",
nvim_web_devicons = "4415d1aaa56f73b9c05795af84d625c610b05d3b",
+ onedarker = "b00dd2189f264c5aeb4cf04c59439655ecd573ec",
packer = "c576ab3f1488ee86d60fd340d01ade08dcabd256",
plenary = "14dfb4071022b22e08384ee125a5607464b6d397",
popup = "b7404d35d5d3548a82149238289fa71f7f6de4ac",
project = "cef52b8da07648b750d7f1e8fb93f12cb9482988",
- schemastore = "120e95a9e3d60a7410adb1be102268091ed400fb",
+ schemastore = "265eabf9f8ab33cc6bf1683c286b04e280a2b2e7",
structlog = "6f1403a192791ff1fa7ac845a73de9e860f781f1",
- telescope = "b501d9ecb7d8181e2238620c919740025e8b2096",
+ telescope = "a36a813d5d031e6f5d52b74986915e68130febd9",
telescope_fzf_native = "8ec164b541327202e5e74f99bcc5fe5845720e18",
toggleterm = "e97d0c1046512e975a9f3fa95afe98f312752b1c",
- which_key = "28d2bd129575b5e9ebddd88506601290bb2bb221",
+ which_key = "a3c19ec5754debb7bf38a8404e36a9287b282430",
}
return {
@@ -52,13 +53,22 @@ return {
commit = commit.nvim_lsp_installer,
},
{
+ "lunarvim/onedarker.nvim",
+ config = function()
+ require("onedarker").setup()
+ lvim.builtin.lualine.options.theme = "onedarker"
+ end,
+ commit = commit.onedarker,
+ disable = lvim.colorscheme ~= "onedarker",
+ },
+ {
"rcarriga/nvim-notify",
commit = commit.nvim_notify,
- disable = not lvim.builtin.notify.active,
config = function()
require("lvim.core.notify").setup()
end,
- event = "BufRead",
+ requires = { "nvim-telescope/telescope.nvim" },
+ disable = not lvim.builtin.notify.active or not lvim.builtin.telescope.active,
},
{ "Tastyep/structlog.nvim", commit = commit.structlog },
@@ -75,6 +85,7 @@ return {
},
{
"nvim-telescope/telescope-fzf-native.nvim",
+ requires = { "nvim-telescope/telescope.nvim" },
commit = commit.telescope_fzf_native,
run = "make",
disable = not lvim.builtin.telescope.active,
@@ -253,14 +264,14 @@ return {
disable = not lvim.builtin.dap.active,
},
- -- Dashboard
+ -- alpha
{
- "ChristianChiarulli/dashboard-nvim",
- event = "BufWinEnter",
+ "goolord/alpha-nvim",
config = function()
- require("lvim.core.dashboard").setup()
+ require("lvim.core.alpha").setup()
end,
- disable = not lvim.builtin.dashboard.active,
+ commit = commit.alpha_nvim,
+ disable = not lvim.builtin.alpha.active,
},
-- Terminal
diff --git a/lua/lvim/utils/git.lua b/lua/lvim/utils/git.lua
index 8f25a2bb..ce323160 100644
--- a/lua/lvim/utils/git.lua
+++ b/lua/lvim/utils/git.lua
@@ -1,11 +1,12 @@
local M = {}
local Log = require "lvim.core.log"
+local if_nil = vim.F.if_nil
local function git_cmd(opts)
local plenary_loaded, Job = pcall(require, "plenary.job")
if not plenary_loaded then
- vim.cmd "packadd plenary.nvim"
+ return 1, { "" }
end
opts = opts or {}
@@ -89,51 +90,27 @@ end
---Get the current Lunarvim development branch
---@return string|nil
function M.get_lvim_branch()
- local ret, branch = git_cmd { args = { "rev-parse", "--abbrev-ref", "HEAD" } }
- if ret ~= 0 or (not branch or branch[1] == "") then
- Log:error "Unable to retrieve the name of the current branch. Check the log for further information"
- return
- end
- return branch[1]
+ local _, results = git_cmd { args = { "rev-parse", "--abbrev-ref", "HEAD" } }
+ local branch = if_nil(results[1], "")
+ return branch
end
---Get currently checked-out tag of Lunarvim
----@param type string can be "short"
----@return string|nil
-function M.get_lvim_tag(type)
- type = type or ""
- local ret, results = git_cmd { args = { "describe", "--tags" } }
- local lvim_full_ver = results[1] or ""
+---@return string
+function M.get_lvim_tag()
+ local args = { "describe", "--tags", "--abbrev=0" }
- if ret ~= 0 or string.match(lvim_full_ver, "%d") == nil then
- return nil
- end
- if type == "short" then
- return vim.fn.split(lvim_full_ver, "-")[1]
- else
- return string.sub(lvim_full_ver, 1, #lvim_full_ver - 1)
- end
+ local _, results = git_cmd { args = args }
+ local tag = if_nil(results[1], "")
+ return tag
end
---Get the commit hash of currently checked-out commit of Lunarvim
----@param type string can be "short"
---@return string|nil
-function M.get_lvim_version(type)
- type = type or ""
- local branch = M.get_lvim_branch()
- if branch == "master" then
- return M.get_lvim_tag(type)
- end
- local ret, log_results = git_cmd { args = { "log", "--pretty=format:%h", "-1" } }
- local abbrev_version = log_results[1] or ""
- if ret ~= 0 or string.match(abbrev_version, "%d") == nil then
- Log:error "Unable to retrieve current version. Check the log for further information"
- return nil
- end
- if type == "short" then
- return abbrev_version
- end
- return branch .. "-" .. abbrev_version
+function M.get_lvim_current_sha()
+ local _, log_results = git_cmd { args = { "log", "--pretty=format:%h", "-1" } }
+ local abbrev_version = if_nil(log_results[1], "")
+ return abbrev_version
end
function M.generate_plugins_sha(output)
diff --git a/lua/lvim/utils/hooks.lua b/lua/lvim/utils/hooks.lua
index d28123ab..b40f2c23 100644
--- a/lua/lvim/utils/hooks.lua
+++ b/lua/lvim/utils/hooks.lua
@@ -12,8 +12,10 @@ function M.run_pre_reload()
end
function M.run_on_packer_complete()
- -- manually trigger event to fix colors
- vim.cmd [[ doautocmd ColorScheme ]]
+ if not in_headless then
+ -- manually trigger event to fix colors
+ vim.cmd [[ doautocmd ColorScheme ]]
+ end
Log:info "Reloaded configuration"
end
diff --git a/lua/onedarker/Git.lua b/lua/onedarker/Git.lua
deleted file mode 100644
index b47ccf23..00000000
--- a/lua/onedarker/Git.lua
+++ /dev/null
@@ -1,10 +0,0 @@
-local Git = {
- SignAdd = { fg = C.sign_add },
- SignChange = { fg = C.sign_change },
- SignDelete = { fg = C.sign_delete },
- GitSignsAdd = { fg = C.sign_add },
- GitSignsChange = { fg = C.sign_change },
- GitSignsDelete = { fg = C.sign_delete },
-}
-
-return Git
diff --git a/lua/onedarker/LSP.lua b/lua/onedarker/LSP.lua
deleted file mode 100644
index 82b9f799..00000000
--- a/lua/onedarker/LSP.lua
+++ /dev/null
@@ -1,121 +0,0 @@
-local LSP = {
- LspDiagnosticsDefaultError = { fg = C.error_red },
- LspDiagnosticsDefaultWarning = { fg = C.warning_orange },
- LspDiagnosticsDefaultInformation = { fg = C.info_yellow },
- LspDiagnosticsDefaultHint = { fg = C.hint_blue },
- LspDiagnosticsVirtualTextError = { fg = C.error_red },
- LspDiagnosticsVirtualTextWarning = { fg = C.warning_orange },
- LspDiagnosticsVirtualTextInformation = { fg = C.info_yellow },
- LspDiagnosticsVirtualTextHint = { fg = C.hint_blue },
- LspDiagnosticsFloatingError = { fg = C.error_red },
- LspDiagnosticsFloatingWarning = { fg = C.warning_orange },
- LspDiagnosticsFloatingInformation = { fg = C.info_yellow },
- LspDiagnosticsFloatingHint = { fg = C.hint_blue },
- DiagnosticFloatingError = { fg = C.error_red },
- DiagnosticFloatingWarn = { fg = C.warning_orange },
- DiagnosticFloatingInfo = { fg = C.info_yellow },
- DiagnosticFloatingHint = { fg = C.hint_blue },
- LspDiagnosticsSignError = { fg = C.error_red },
- LspDiagnosticsSignWarning = { fg = C.warning_orange },
- LspDiagnosticsSignInformation = { fg = C.info_yellow },
- LspDiagnosticsSignHint = { fg = C.hint_blue },
- DiagnosticSignError = { fg = C.error_red },
- DiagnosticSignWarn = { fg = C.warning_orange },
- DiagnosticSignInfo = { fg = C.info_yellow },
- DiagnosticSignHint = { fg = C.hint_blue },
- LspDiagnosticsError = { fg = C.error_red },
- LspDiagnosticsWarning = { fg = C.warning_orange },
- LspDiagnosticsInformation = { fg = C.info_yellow },
- LspDiagnosticsHint = { fg = C.hint_blue },
- LspDiagnosticsUnderlineError = { style = "underline" },
- LspDiagnosticsUnderlineWarning = { style = "underline" },
- LspDiagnosticsUnderlineInformation = { style = "underline" },
- LspDiagnosticsUnderlineHint = { style = "underline" },
- DiagnosticUnderlineError = { style = "underline" },
- DiagnosticUnderlineWarn = { style = "underline" },
- DiagnosticUnderlineInfo = { style = "underline" },
- DiagnosticUnderlineHint = { style = "underline" },
- LspReferenceRead = { bg = C.fg_gutter, style = "bold" },
- LspReferenceText = { bg = C.fg_gutter, style = "bold" },
- LspReferenceWrite = { bg = C.fg_gutter, style = "bold" },
- QuickScopePrimary = { fg = C.purple_test, style = "underline" },
- QuickScopeSecondary = { fg = C.cyan_test, style = "underline" },
- TelescopeSelection = { fg = C.hint_blue },
- TelescopeMatching = { fg = C.info_yellow, style = "bold" },
- TelescopeBorder = { fg = C.cyan, bg = Config.transparent_background and "NONE" or C.bg },
- TelescopePromptPrefix = { fg = C.purple },
- NvimTreeFolderIcon = { fg = C.blue },
- NvimTreeIndentMarker = { fg = C.gray },
- NvimTreeNormal = { fg = C.light_gray, bg = C.alt_bg },
- NvimTreeVertSplit = { fg = C.alt_bg, bg = C.alt_bg },
- NvimTreeFolderName = { fg = C.blue },
- NvimTreeOpenedFolderName = { fg = C.cyan, style = "italic" },
- NvimTreeImageFile = { fg = C.purple },
- NvimTreeSpecialFile = { fg = C.orange },
- NvimTreeGitStaged = { fg = C.sign_add },
- NvimTreeCursorLine = { bg = C.bg },
- NvimTreeGitNew = { fg = C.sign_add },
- NvimTreeGitDirty = { fg = C.sign_add },
- NvimTreeGitDeleted = { fg = C.sign_delete },
- NvimTreeGitMerge = { fg = C.sign_change },
- NvimTreeGitRenamed = { fg = C.sign_change },
- NvimTreeSymlink = { fg = C.cyan },
- NvimTreeRootFolder = { fg = C.fg, style = "bold" },
- NvimTreeExecFile = { fg = C.green },
- LirFloatNormal = { fg = C.light_gray, bg = C.alt_bg },
- LirDir = { fg = C.blue },
- LirSymLink = { fg = C.cyan },
- LirEmptyDirText = { fg = C.blue },
- BufferCurrent = { fg = C.fg, bg = C.bg },
- BufferCurrentIndex = { fg = C.fg, bg = C.bg },
- BufferCurrentMod = { fg = C.info_yellow, bg = C.bg },
- BufferCurrentSign = { fg = C.hint_blue, bg = C.bg },
- BufferCurrentTarget = { fg = C.red, bg = C.bg, style = "bold" },
- BufferVisible = { fg = C.fg, bg = C.bg },
- BufferVisibleIndex = { fg = C.fg, bg = C.bg },
- BufferVisibleMod = { fg = C.info_yellow, bg = C.bg },
- BufferVisibleSign = { fg = C.gray, bg = C.bg },
- BufferVisibleTarget = { fg = C.red, bg = C.bg, style = "bold" },
- BufferInactive = { fg = C.gray, bg = C.alt_bg },
- BufferInactiveIndex = { fg = C.gray, bg = C.alt_bg },
- BufferInactiveMod = { fg = C.info_yellow, bg = C.alt_bg },
- BufferInactiveSign = { fg = C.gray, bg = C.alt_bg },
- BufferInactiveTarget = { fg = C.red, bg = C.alt_bg, style = "bold" },
- StatusLine = { fg = C.alt_bg },
- StatusLineNC = { fg = C.alt_bg },
- StatusLineSeparator = { fg = C.alt_bg },
- StatusLineTerm = { fg = C.alt_bg },
- StatusLineTermNC = { fg = C.alt_bg },
- CodiVirtualText = { fg = C.hint_blue },
- IndentBlanklineContextChar = { fg = C.context },
- IndentBlanklineChar = { fg = C.dark_gray },
- IndentBlanklineSpaceChar = { fg = C.cyan_test },
- IndentBlanklineSpaceCharBlankline = { fg = C.info_yellow },
- DashboardHeader = { fg = C.blue },
- DashboardCenter = { fg = C.purple },
- DashboardFooter = { fg = C.cyan },
- xmlTag = { fg = C.blue },
- xmlTagName = { fg = C.blue },
- xmlEndTag = { fg = C.blue },
- CompeDocumentation = { bg = C.alt_bg },
- DiffViewNormal = { fg = C.gray, bg = C.alt_bg },
- DiffviewStatusAdded = { fg = C.sign_add },
- DiffviewStatusModified = { fg = C.sign_change },
- DiffviewStatusRenamed = { fg = C.sign_change },
- DiffviewStatusDeleted = { fg = C.sign_delete },
- DiffviewFilePanelInsertion = { fg = C.sign_add },
- DiffviewFilePanelDeletion = { fg = C.sign_delete },
- DiffviewVertSplit = { bg = C.bg },
- diffAdded = { fg = C.sign_add },
- diffRemoved = { fg = C.sign_delete },
- diffFileId = { fg = C.blue, style = "bold,reverse" },
- diffFile = { fg = C.alt_bg },
- diffNewFile = { fg = C.green },
- diffOldFile = { fg = C.red },
- debugPc = { bg = C.cyan },
- debugBreakpoint = { fg = C.red, style = "reverse" },
- FocusedSymbol = { fg = C.purple, style = "bold" },
- SymbolsOutlineConnector = { fg = C.context },
-}
-
-return LSP
diff --git a/lua/onedarker/Notify.lua b/lua/onedarker/Notify.lua
deleted file mode 100644
index 4eebc00e..00000000
--- a/lua/onedarker/Notify.lua
+++ /dev/null
@@ -1,24 +0,0 @@
-local Notify = {
- NotifyERRORBorder = { fg = C.error_red },
- NotifyWARNBorder = { fg = C.warning_orange },
- NotifyINFOBorder = { fg = C.green },
- NotifyDEBUGBorder = { fg = C.purple_test },
- NotifyTRACEBorder = { fg = C.purple },
- NotifyERRORIcon = { fg = C.error_red },
- NotifyWARNIcon = { fg = C.warning_orange },
- NotifyINFOIcon = { fg = C.green },
- NotifyDEBUGIcon = { fg = C.purple_test },
- NotifyTRACEIcon = { fg = C.purple },
- NotifyERRORTitle = { fg = C.error_red },
- NotifyWARNTitle = { fg = C.warning_orange },
- NotifyINFOTitle = { fg = C.green },
- NotifyDEBUGTitle = { fg = C.purple_test },
- NotifyTRACETitle = { fg = C.purple },
- NotifyERRORBody = { fg = C.fg },
- NotifyWARNBody = { fg = C.fg },
- NotifyINFOBody = { fg = C.fg },
- NotifyDEBUGBody = { fg = C.fg },
- NotifyTRACEBody = { fg = C.fg },
-}
-
-return Notify
diff --git a/lua/onedarker/Treesitter.lua b/lua/onedarker/Treesitter.lua
deleted file mode 100644
index 0718b852..00000000
--- a/lua/onedarker/Treesitter.lua
+++ /dev/null
@@ -1,66 +0,0 @@
-local Treesitter = {
- TSComment = { fg = C.gray },
- TSAnnotation = { fg = C.blue },
- TSAttribute = { fg = C.cyan },
- TSConstructor = { fg = C.yellow },
- TSType = { fg = C.yellow },
- TSTypeBuiltin = { fg = C.yellow },
- TSConditional = { fg = C.purple },
- TSException = { fg = C.purple },
- TSInclude = { fg = C.purple },
- TSKeyword = { fg = C.purple },
- TSKeywordReturn = { fg = C.purple },
- TSKeywordFunction = { fg = C.purple },
- TSLabel = { fg = C.blue },
- TSNone = { fg = C.fg },
- TSNamespace = { fg = C.purple },
- TSRepeat = { fg = C.purple },
- TSConstant = { fg = C.orange },
- TSConstBuiltin = { fg = C.orange },
- TSFloat = { fg = C.orange },
- TSNumber = { fg = C.orange },
- TSBoolean = { fg = C.orange },
- TSCharacter = { fg = C.green },
- TSError = { fg = C.error_red },
- TSFunction = { fg = C.blue },
- TSFuncBuiltin = { fg = C.blue },
- TSMethod = { fg = C.blue },
- TSConstMacro = { fg = C.cyan },
- TSFuncMacro = { fg = C.blue },
- TSProperty = { fg = C.cyan },
- TSOperator = { fg = C.purple },
- TSField = { fg = C.blue },
- TSParameter = { fg = C.red },
- TSParameterReference = { fg = C.red },
- TSVariable = { fg = C.fg },
- TSVariableBuiltin = { fg = C.red },
- TSSymbol = { fg = C.cyan },
- TSText = { fg = C.fg },
- TSTextReference = { fg = C.red },
- TSPunctDelimiter = { fg = C.fg },
- TSTagDelimiter = { fg = C.gray },
- TSTagAttribute = { fg = C.orange },
- TSPunctBracket = { fg = C.fg },
- TSPunctSpecial = { fg = C.fg },
- TSString = { fg = C.green },
- TSStringRegex = { fg = C.orange },
- TSStringEscape = { fg = C.orange },
- TSTag = { fg = C.blue },
- TSEmphasis = { style = "italic" },
- TSUnderline = { style = "underline" },
- TSNote = { fg = C.info_yellow, style = "bold" },
- TSWarning = { fg = C.warning_orange, style = "bold" },
- TSDanger = { fg = C.error_red, style = "bold" },
- TSTitle = { fg = C.blue, style = "bold" },
- TSLiteral = { fg = C.green },
- TSURI = { fg = C.blue, style = "underline" },
- TSMath = { fg = C.fg },
- TSKeywordOperator = { fg = C.purple },
- TSStructure = { fg = C.fg },
- TSStrong = { fg = C.yellow_orange },
- TSQueryLinterError = { fg = C.warning_orange },
- TSEnvironment = { fg = C.fg },
- TSEnvironmentName = { fg = C.fg },
-}
-
-return Treesitter
diff --git a/lua/onedarker/Whichkey.lua b/lua/onedarker/Whichkey.lua
deleted file mode 100644
index 86b42bd6..00000000
--- a/lua/onedarker/Whichkey.lua
+++ /dev/null
@@ -1,9 +0,0 @@
-local Whichkey = {
- WhichKey = { fg = C.purple },
- WhichKeySeperator = { fg = C.green },
- WhichKeyGroup = { fg = C.cyan },
- WhichKeyDesc = { fg = C.blue },
- WhichKeyFloat = { bg = C.dark },
-}
-
-return Whichkey
diff --git a/lua/onedarker/config.lua b/lua/onedarker/config.lua
deleted file mode 100644
index ebac7109..00000000
--- a/lua/onedarker/config.lua
+++ /dev/null
@@ -1,23 +0,0 @@
-local config
-
-vim = vim or { g = {}, o = {} }
-
-local function opt(key, default)
- if vim.g[key] == nil then
- return default
- end
- if vim.g[key] == 0 then
- return false
- end
- return vim.g[key]
-end
-
-config = {
- transparent_background = opt("transparent_background", false),
- italic_comments = opt("italic_keywords", true) and "italic" or "NONE",
- italic_keywords = opt("italic_keywords", true) and "italic" or "NONE",
- italic_functions = opt("italic_function", false) and "italic" or "NONE",
- italic_variables = opt("italic_variables", true) and "italic" or "NONE",
-}
-
-return config
diff --git a/lua/onedarker/diff.lua b/lua/onedarker/diff.lua
deleted file mode 100644
index 49463daa..00000000
--- a/lua/onedarker/diff.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-local diff = {
- DiffAdd = { fg = C.none, bg = C.diff_add },
- DiffDelete = { fg = C.none, bg = C.diff_delete },
- DiffChange = { fg = C.none, bg = C.diff_change, style = "bold" },
- DiffText = { fg = C.none, bg = C.diff_text },
- DiffAdded = { fg = C.green },
- DiffRemoved = { fg = C.red },
- DiffFile = { fg = C.cyan },
- DiffIndexLine = { fg = C.gray },
-}
-
-return diff
diff --git a/lua/onedarker/highlights.lua b/lua/onedarker/highlights.lua
deleted file mode 100644
index f035635b..00000000
--- a/lua/onedarker/highlights.lua
+++ /dev/null
@@ -1,107 +0,0 @@
-local highlights = {
- Normal = { fg = C.fg, bg = Config.transparent_background and "NONE" or C.bg },
- SignColumn = { bg = C.bg },
- MsgArea = { fg = C.fg, bg = Config.transparent_background and "NONE" or C.bg },
- ModeMsg = { fg = C.fg, bg = C.bg },
- MsgSeparator = { fg = C.fg, bg = C.bg },
- SpellBad = { fg = C.error_red, style = "underline" },
- SpellCap = { fg = C.yellow, style = "underline" },
- SpellLocal = { fg = C.green, style = "underline" },
- SpellRare = { fg = C.purple, style = "underline" },
- NormalNC = { fg = C.fg, bg = Config.transparent_background and "NONE" or C.bg },
- Pmenu = { fg = C.light_gray, bg = C.popup_back },
- PmenuSel = { fg = C.alt_bg, bg = C.blue },
- WildMenu = { fg = C.alt_bg, bg = C.blue },
- CursorLineNr = { fg = C.light_gray, style = "bold" },
- Comment = { fg = C.gray, style = "italic" },
- Folded = { fg = C.accent, bg = C.alt_bg },
- FoldColumn = { fg = C.accent, bg = C.alt_bg },
- LineNr = { fg = C.context },
- FloatBorder = { fg = C.gray, bg = C.alt_bg },
- Whitespace = { fg = C.gray },
- VertSplit = { fg = C.bg, bg = C.fg },
- CursorLine = { bg = C.dark },
- CursorColumn = { bg = C.dark },
- ColorColumn = { bg = C.dark },
- NormalFloat = { bg = C.dark },
- Visual = { bg = C.ui_blue },
- VisualNOS = { bg = C.alt_bg },
- WarningMsg = { fg = C.error_red, bg = C.bg },
- DiffAdd = { fg = C.alt_bg, bg = C.sign_add },
- DiffChange = { fg = C.alt_bg, bg = C.sign_change, style = "underline" },
- DiffDelete = { fg = C.alt_bg, bg = C.sign_delete },
- QuickFixLine = { bg = C.dark_gray },
- PmenuSbar = { bg = C.alt_bg },
- PmenuThumb = { bg = C.gray },
- MatchWord = { style = "underline" },
- MatchParen = { fg = C.hint_blue, bg = C.bg, style = "underline" },
- MatchWordCur = { style = "underline" },
- MatchParenCur = { style = "underline" },
- Cursor = { fg = C.cursor_fg, bg = C.cursor_bg },
- lCursor = { fg = C.cursor_fg, bg = C.cursor_bg },
- CursorIM = { fg = C.cursor_fg, bg = C.cursor_bg },
- TermCursor = { fg = C.cursor_fg, bg = C.cursor_bg },
- TermCursorNC = { fg = C.cursor_fg, bg = C.cursor_bg },
- Conceal = { fg = C.accent, bg = Config.transparent_background and "NONE" or C.bg },
- Directory = { fg = C.blue },
- SpecialKey = { fg = C.blue, style = "bold" },
- Title = { fg = C.blue, style = "bold" },
- ErrorMsg = { fg = C.error_red, bg = C.bg, style = "bold" },
- Search = { fg = C.light_gray, bg = C.search_blue },
- IncSearch = { fg = C.light_gray, bg = C.search_blue },
- Substitute = { fg = C.light_gray, bg = C.search_orange },
- MoreMsg = { fg = C.orange },
- Question = { fg = C.orange },
- EndOfBuffer = { fg = C.bg },
- NonText = { fg = C.context },
- Variable = { fg = C.cyan },
- String = { fg = C.green },
- Character = { fg = C.green },
- Constant = { fg = C.orange },
- Number = { fg = C.orange },
- Boolean = { fg = C.orange },
- Float = { fg = C.orange },
- Identifier = { fg = C.fg },
- Function = { fg = C.blue },
- Operator = { fg = C.purple },
- Type = { fg = C.yellow },
- StorageClass = { fg = C.cyan },
- Structure = { fg = C.purple },
- Typedef = { fg = C.purple },
- Keyword = { fg = C.purple },
- Statement = { fg = C.purple },
- Conditional = { fg = C.purple },
- Repeat = { fg = C.purple },
- Label = { fg = C.blue },
- Exception = { fg = C.purple },
- Include = { fg = C.purple },
- PreProc = { fg = C.purple },
- Define = { fg = C.purple },
- Macro = { fg = C.purple },
- PreCondit = { fg = C.purple },
- Special = { fg = C.purple },
- SpecialChar = { fg = C.fg },
- Tag = { fg = C.blue },
- Debug = { fg = C.red },
- Delimiter = { fg = C.fg },
- SpecialComment = { fg = C.gray },
- Underlined = { style = "underline" },
- Bold = { style = "bold" },
- Italic = { style = "italic" },
- Ignore = { fg = C.cyan, bg = C.bg, style = "bold" },
- Todo = { fg = C.red, bg = C.bg, style = "bold" },
- Error = { fg = C.error_red, bg = C.bg, style = "bold" },
- TabLine = { fg = C.light_gray, bg = C.alt_bg },
- TabLineSel = { fg = C.fg, bg = C.alt_bg },
- TabLineFill = { fg = C.fg, bg = C.alt_bg },
- CmpDocumentation = { fg = C.fg, bg = C.none },
- CmpDocumentationBorder = { fg = C.fg_dark, bg = C.none },
- CmpItemAbbr = { fg = C.fg, bg = C.none },
- CmpItemAbbrDeprecated = { fg = C.gray, bg = C.none },
- CmpItemAbbrMatch = { fg = C.cyan, bg = C.none },
- CmpItemAbbrMatchFuzzy = { fg = C.cyan, bg = C.none },
- CmpItemKind = { fg = C.blue, bg = C.none },
- CmpItemMenu = { fg = C.light_gray, bg = C.none },
-}
-
-return highlights
diff --git a/lua/onedarker/init.lua b/lua/onedarker/init.lua
deleted file mode 100644
index dec56afa..00000000
--- a/lua/onedarker/init.lua
+++ /dev/null
@@ -1,34 +0,0 @@
-vim.api.nvim_command "hi clear"
-if vim.fn.exists "syntax_on" then
- vim.api.nvim_command "syntax reset"
-end
-vim.o.background = "dark"
-vim.o.termguicolors = true
-vim.g.colors_name = "onedarker"
-
-local util = require "onedarker.util"
-Config = require "onedarker.config"
-C = require "onedarker.palette"
-local highlights = require "onedarker.highlights"
-local Treesitter = require "onedarker.Treesitter"
-local markdown = require "onedarker.markdown"
-local Whichkey = require "onedarker.Whichkey"
-local Notify = require "onedarker.Notify"
-local Git = require "onedarker.Git"
-local LSP = require "onedarker.LSP"
-local diff = require "onedarker.diff"
-
-local skeletons = {
- highlights,
- Treesitter,
- markdown,
- Whichkey,
- Notify,
- Git,
- LSP,
- diff,
-}
-
-for _, skeleton in ipairs(skeletons) do
- util.initialise(skeleton)
-end
diff --git a/lua/onedarker/markdown.lua b/lua/onedarker/markdown.lua
deleted file mode 100644
index d3a5d485..00000000
--- a/lua/onedarker/markdown.lua
+++ /dev/null
@@ -1,27 +0,0 @@
-local markdown = {
- markdownBlockquote = { fg = C.accent },
- markdownBold = { fg = C.yellow, style = "bold" },
- markdownCode = { fg = C.green },
- markdownCodeBlock = { fg = C.green },
- markdownCodeDelimiter = { fg = C.green },
- markdownH1 = { fg = C.blue },
- markdownH2 = { fg = C.blue },
- markdownH3 = { fg = C.blue },
- markdownH4 = { fg = C.blue },
- markdownH5 = { fg = C.blue },
- markdownH6 = { fg = C.blue },
- markdownHeadingDelimiter = { fg = C.blue },
- markdownHeadingRule = { fg = C.accent },
- markdownId = { fg = C.purple },
- markdownIdDeclaration = { fg = C.blue },
- markdownIdDelimiter = { fg = C.light_gray },
- markdownLinkDelimiter = { fg = C.light_gray },
- markdownItalic = { style = "italic" },
- markdownLinkText = { fg = C.blue },
- markdownListMarker = { fg = C.red },
- markdownOrderedListMarker = { fg = C.red },
- markdownRule = { fg = C.accent },
- markdownUrl = { fg = C.cyan, style = "underline" },
-}
-
-return markdown
diff --git a/lua/onedarker/palette.lua b/lua/onedarker/palette.lua
deleted file mode 100644
index 81ea3af3..00000000
--- a/lua/onedarker/palette.lua
+++ /dev/null
@@ -1,45 +0,0 @@
-local colors = {
- none = "NONE",
- fg = "#abb2bf",
- bg = "#1f2227",
- alt_bg = "#282c34",
- dark = "#282c34",
- accent = "#BBBBBB",
- dark_gray = "#2a2f3e",
- fg_gutter = "#353d46",
- context = "#4b5263",
- popup_back = "#282c34",
- search_orange = "#613214",
- search_blue = "#5e81ac",
- gray = "#5c6370",
- light_gray = "#abb2bf",
- blue = "#61AFEF",
- dark_blue = "#223E55",
- green = "#98C379",
- cyan = "#56B6C2",
- red = "#e06c75",
- orange = "#D19A66",
- light_red = "#be5046",
- yellow = "#E5C07B",
- yellow_orange = "#D7BA7D",
- purple = "#C678DD",
- magenta = "#D16D9E",
- cursor_fg = "#515052",
- cursor_bg = "#AEAFAD",
- sign_add = "#587c0c",
- sign_change = "#0c7d9d",
- sign_delete = "#94151b",
- error_red = "#F44747",
- warning_orange = "#ff8800",
- info_yellow = "#FFCC66",
- hint_blue = "#4FC1FF",
- purple_test = "#ff007c",
- cyan_test = "#00dfff",
- ui_blue = "#264F78",
- diff_add = "#303d27",
- diff_delete = "#6e3b40",
- diff_change = "#18344c",
- diff_text = "#265478",
-}
-
-return colors
diff --git a/lua/onedarker/util.lua b/lua/onedarker/util.lua
deleted file mode 100644
index dbac18a2..00000000
--- a/lua/onedarker/util.lua
+++ /dev/null
@@ -1,25 +0,0 @@
-local M = {}
-
-local function highlight(group, properties)
- local bg = properties.bg == nil and "" or "guibg=" .. properties.bg
- local fg = properties.fg == nil and "" or "guifg=" .. properties.fg
- local style = properties.style == nil and "" or "gui=" .. properties.style
-
- local cmd = table.concat({
- "highlight",
- group,
- bg,
- fg,
- style,
- }, " ")
-
- vim.api.nvim_command(cmd)
-end
-
-function M.initialise(skeleton)
- for group, properties in pairs(skeleton) do
- highlight(group, properties)
- end
-end
-
-return M
diff --git a/utils/installer/config.example.lua b/utils/installer/config.example.lua
index 9c69a851..4ea98fbe 100644
--- a/utils/installer/config.example.lua
+++ b/utils/installer/config.example.lua
@@ -54,7 +54,8 @@ lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
-- TODO: User Config for predefined plugins
-- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
-lvim.builtin.dashboard.active = true
+lvim.builtin.alpha.active = true
+lvim.builtin.alpha.mode = "dashboard"
lvim.builtin.notify.active = true
lvim.builtin.terminal.active = true
lvim.builtin.nvimtree.setup.view.side = "left"
diff --git a/utils/installer/install.ps1 b/utils/installer/install.ps1
index 2df114e5..bef15ac2 100644
--- a/utils/installer/install.ps1
+++ b/utils/installer/install.ps1
@@ -262,7 +262,7 @@ function create_alias {
$lvim_bin="$INSTALL_PREFIX\bin\lvim.ps1"
$lvim_alias = Get-Alias lvim -ErrorAction SilentlyContinue
- if ($lvim_alias.Definition == $lvim_bin) {
+ if ($lvim_alias.Definition -eq $lvim_bin) {
Write-Output "Alias is already set and will not be reset."
return
}
diff --git a/utils/installer/install.sh b/utils/installer/install.sh
index 6aca4ca9..de936d6d 100755
--- a/utils/installer/install.sh
+++ b/utils/installer/install.sh
@@ -322,7 +322,7 @@ function verify_lvim_dirs() {
function backup_old_config() {
local src="$LUNARVIM_CONFIG_DIR"
- if [ ! -d "$dir" ]; then
+ if [ ! -d "$src" ]; then
return
fi
mkdir -p "$src.old"
diff --git a/utils/media/demo1.png b/utils/media/demo1.png
deleted file mode 100755
index f1591dd6..00000000
--- a/utils/media/demo1.png
+++ /dev/null
Binary files differ
diff --git a/utils/media/demo2.png b/utils/media/demo2.png
deleted file mode 100755
index 9bc613e5..00000000
--- a/utils/media/demo2.png
+++ /dev/null
Binary files differ
diff --git a/utils/media/demo3.png b/utils/media/demo3.png
deleted file mode 100755
index 29caa338..00000000
--- a/utils/media/demo3.png
+++ /dev/null
Binary files differ
diff --git a/utils/media/lunarvim_logo_dark.png b/utils/media/lunarvim_logo_dark.png
deleted file mode 100755
index f605b306..00000000
--- a/utils/media/lunarvim_logo_dark.png
+++ /dev/null
Binary files differ