Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/LunarVim/LunarVim into Lu…
Browse files Browse the repository at this point in the history
…narVim-master
  • Loading branch information
mfauzaan committed Jun 3, 2024
2 parents d880ac6 + 85ccca9 commit 5844bc8
Show file tree
Hide file tree
Showing 36 changed files with 301 additions and 168 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install commitlint
run: |
npm install --save-dev @commitlint/cli
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ on:
jobs:
stylua-check:
name: "Formatting check with Stylua"
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Lint with stylua
uses: JohnnyMorganz/stylua-action@v2
Expand All @@ -27,18 +27,18 @@ jobs:

shfmt-check:
name: "Formatting check with shfmt"
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.18"
go-version: '^1.21'

- name: Use shfmt
run: |
go install mvdan.cc/sh/v3/cmd/shfmt@v3.6
go install mvdan.cc/sh/v3/cmd/shfmt@latest
# https://google.github.io/styleguide/shellguide.html
- name: Check formatting
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
include:
- runner: ubuntu-latest
os: linux
neovim: v0.9.1
neovim: v0.10.0
- runner: macos-latest
os: osx
neovim: v0.9.1
neovim: v0.10.0
- runner: ubuntu-22.04
os: linux
neovim: nightly
Expand All @@ -33,14 +33,13 @@ jobs:
neovim: nightly
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install neovim binary from release
env:
RELEASE_VER: ${{ matrix.neovim }}
run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
bash ./utils/installer/install-neovim-from-release
- name: Install neovim binary
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.neovim }}

- name: Install LunarVim
timeout-minutes: 4
Expand Down Expand Up @@ -72,13 +71,13 @@ jobs:
shell: pwsh
steps:
# it's not currently possbile to run tests on windows, see nvim-lua/plenary.nvim#255
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install neovim binary
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: v0.9.1
version: v0.10.0

- name: Install LunarVim
timeout-minutes: 4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ on:
jobs:
lua-linter:
name: "Linting with luacheck"
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: leafo/gh-actions-lua@v8
- uses: leafo/gh-actions-luarocks@v4
Expand All @@ -30,7 +30,7 @@ jobs:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install neovim binary
uses: rhysd/action-setup-vim@v1
Expand Down
67 changes: 66 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,72 @@

All notable changes to this project will be documented in this file.

## [unreleased]
## [1.4.0]

### <!-- 1 --> Features

- _(installer)_ added bun as a js package manager ([#4362](https://github.com/lunarvim/lunarvim/pull/4362))
- _(lspconfig)_ add rounded borders to :LspInfo window ([#4208](https://github.com/lunarvim/lunarvim/pull/4208))
- _(nvimtree)_ centralize selection ([#4160](https://github.com/lunarvim/lunarvim/pull/4160))
- _(plugins)_ migrate from `null-ls` to `none-ls` ([#4392](https://github.com/lunarvim/lunarvim/pull/4392))
- simplify example config, add links for user instead ([#4128](https://github.com/lunarvim/lunarvim/pull/4128))
- don't move config on install ([#4129](https://github.com/lunarvim/lunarvim/pull/4129))
- rounded border for hover and signatureHelp ([#4131](https://github.com/lunarvim/lunarvim/pull/4131))
- lock new installations to nvim 0.9+ ([#3858](https://github.com/lunarvim/lunarvim/pull/3858))
- use code chevrons ([#4184](https://github.com/lunarvim/lunarvim/pull/4184))
- ignore missing keys for whichkey ([#4185](https://github.com/lunarvim/lunarvim/pull/4185))
- [**breaking**] use prompts similar to `:confirm` in `buf_kill` ([#4186](https://github.com/lunarvim/lunarvim/pull/4186))
- add starter.lvim link to config.example.lua ([#4200](https://github.com/lunarvim/lunarvim/pull/4200))
- add example to the packer deprecation message ([#4201](https://github.com/lunarvim/lunarvim/pull/4201))

### <!-- 2 --> Bugfix

- _(alpha)_ account for different icon byte sizes ([#4130](https://github.com/lunarvim/lunarvim/pull/4130))
- _(dap)_ ui opens when debugging ([#4116](https://github.com/lunarvim/lunarvim/pull/4116))
- _(default-options)_ remove invalid guifont option ([#4447](https://github.com/lunarvim/lunarvim/pull/4447))
- _(deprecation)_ only deprecate `tag == "*"` in lvim.plugins ([#4297](https://github.com/lunarvim/lunarvim/pull/4297))
- _(icons)_ add some whitespace to the boolean icon ([#4163](https://github.com/lunarvim/lunarvim/pull/4163))
- _(install)_ add newline after setup message ([#4533](https://github.com/lunarvim/lunarvim/pull/4533))
- _(installer)_ dependency installation for Windows ([#4486](https://github.com/lunarvim/lunarvim/pull/4486))
- _(lsp)_ add luv library by default to lua_ls ([#4067](https://github.com/lunarvim/lunarvim/pull/4067))
- _(lsp)_ diagnostic codes already show by default ([#4070](https://github.com/lunarvim/lunarvim/pull/4070))
- [**breaking**] _(lsp)_ switch to csharp_ls to avoid startup errors ([#4079](https://github.com/lunarvim/lunarvim/pull/4079))
- _(lsp)_ lazy load mason on FileOpened ([#4100](https://github.com/lunarvim/lunarvim/pull/4100))
- _(lsp)_ skip auto config server even if it's ensure installed ([#4243](https://github.com/lunarvim/lunarvim/pull/4243))
- _(lsp)_ restore float border ([#4274](https://github.com/lunarvim/lunarvim/pull/4274))
- _(lsp)_ adapt recent changes in `nvim-lspconfig` ([#4348](https://github.com/lunarvim/lunarvim/pull/4348))
- _(lualine)_ use get_active_clients instead of deprecated function ([#4136](https://github.com/lunarvim/lunarvim/pull/4136))
- _(nvim-tree)_ use local buffer keymaps ([#4090](https://github.com/lunarvim/lunarvim/pull/4090))
- _(terminal)_ show lazygit bottom line ([#4548](https://github.com/lunarvim/lunarvim/pull/4548))
- _(tests)_ set up lazy.nvim in the lsp test ([#4088](https://github.com/lunarvim/lunarvim/pull/4088))
- _(treesitter)_ add a few parsers to `ensure_installed` ([#4121](https://github.com/lunarvim/lunarvim/pull/4121))
- _(typo)_ `form` to `from` ([#4295](https://github.com/lunarvim/lunarvim/pull/4295))
- _(user_command)_ update url in `LvimDocs` command ([#4081](https://github.com/lunarvim/lunarvim/pull/4081))
- _(win)_ remove '-NoLogo' from vim.opt.shell ([#4232](https://github.com/lunarvim/lunarvim/pull/4232))
- add missing LF to install script ([#4075](https://github.com/lunarvim/lunarvim/pull/4075))
- replace obsolete icons ([#4111](https://github.com/lunarvim/lunarvim/pull/4111))
- correct runtimepath order ([#4124](https://github.com/lunarvim/lunarvim/pull/4124))
- support text if marksman lang server ([#4144](https://github.com/lunarvim/lunarvim/pull/4144))
- circle icons was being cut off for some fonts
- handle context-commentstring setup ([#4451](https://github.com/lunarvim/lunarvim/pull/4451))

### <!-- 3 --> Refactor

- [**breaking**] _(lsp)_ deprecate `lvim.lsp.diagnostics` ([#3916](https://github.com/lunarvim/lunarvim/pull/3916))
- _(lualine)_ use `string.format` to return unique names ([#4193](https://github.com/lunarvim/lunarvim/pull/4193))

### <!-- 4 --> Documentation

- add code_actions to example config ([#4029](https://github.com/lunarvim/lunarvim/pull/4029))
- update broken links in example configs ([#4097](https://github.com/lunarvim/lunarvim/pull/4097))
- use `master` instead of `rolling` in contributing.md ([#4115](https://github.com/lunarvim/lunarvim/pull/4115))
- use `master` instead of `rolling` in contributing.md ([#4115](https://github.com/lunarvim/lunarvim/pull/4115))

### <!-- 6 --> Performance

- _(installer)_ use a shallow clone of lunarvim ([#4197](https://github.com/lunarvim/lunarvim/pull/4197))

## [1.3.0]

### <!-- 1 --> Features

Expand Down
4 changes: 2 additions & 2 deletions lua/lvim/bootstrap.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local M = {}

if vim.fn.has "nvim-0.9" ~= 1 then
vim.notify("Please upgrade your Neovim base installation. Lunarvim requires v0.9+", vim.log.levels.WARN)
if vim.fn.has "nvim-0.10" ~= 1 then
vim.notify("Please upgrade your Neovim base installation. Lunarvim requires v0.10+", vim.log.levels.WARN)
vim.wait(5000, function()
---@diagnostic disable-next-line: redundant-return-value
return false
Expand Down
2 changes: 1 addition & 1 deletion lua/lvim/core/alpha/dashboard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function M.get_sections()
val = function()
local alpha_wins = vim.tbl_filter(function(win)
local buf = vim.api.nvim_win_get_buf(win)
return vim.api.nvim_buf_get_option(buf, "filetype") == "alpha"
return vim.api.nvim_get_option_value("filetype", { buf = buf }) == "alpha"
end, vim.api.nvim_list_wins())

if vim.api.nvim_win_get_height(alpha_wins[#alpha_wins]) < 36 then
Expand Down
14 changes: 7 additions & 7 deletions lua/lvim/core/autocmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,17 @@ function M.load_defaults()
if lvim.builtin.breadcrumbs.active then
require("lvim.core.breadcrumbs").get_winbar()
end
local statusline_hl = vim.api.nvim_get_hl_by_name("StatusLine", true)
local cursorline_hl = vim.api.nvim_get_hl_by_name("CursorLine", true)
local normal_hl = vim.api.nvim_get_hl_by_name("Normal", true)
local statusline_hl = vim.api.nvim_get_hl(0, { name = "StatusLine" })
local cursorline_hl = vim.api.nvim_get_hl(0, { name = "CursorLine" })
local normal_hl = vim.api.nvim_get_hl(0, { name = "Normal" })
vim.api.nvim_set_hl(0, "CmpItemKindCopilot", { fg = "#6CC644" })
vim.api.nvim_set_hl(0, "CmpItemKindTabnine", { fg = "#CA42F0" })
vim.api.nvim_set_hl(0, "CmpItemKindCrate", { fg = "#F64D00" })
vim.api.nvim_set_hl(0, "CmpItemKindEmoji", { fg = "#FDE030" })
vim.api.nvim_set_hl(0, "SLCopilot", { fg = "#6CC644", bg = statusline_hl.background })
vim.api.nvim_set_hl(0, "SLGitIcon", { fg = "#E8AB53", bg = cursorline_hl.background })
vim.api.nvim_set_hl(0, "SLBranchName", { fg = normal_hl.foreground, bg = cursorline_hl.background })
vim.api.nvim_set_hl(0, "SLSeparator", { fg = cursorline_hl.background, bg = statusline_hl.background })
vim.api.nvim_set_hl(0, "SLCopilot", { fg = "#6CC644", bg = statusline_hl.bg })
vim.api.nvim_set_hl(0, "SLGitIcon", { fg = "#E8AB53", bg = cursorline_hl.bg })
vim.api.nvim_set_hl(0, "SLBranchName", { fg = normal_hl.fg, bg = cursorline_hl.bg })
vim.api.nvim_set_hl(0, "SLSeparator", { fg = cursorline_hl.fg, bg = statusline_hl.bg })
end,
},
},
Expand Down
16 changes: 12 additions & 4 deletions lua/lvim/core/autopairs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,26 @@ function M.config()
java = false,
},
disable_filetype = { "TelescopePrompt", "spectre_panel" },
ignored_next_char = string.gsub([[ [%w%%%'%[%"%.] ]], "%s+", ""),
enable_moveright = true,
---@usage disable when recording or executing a macro
disable_in_macro = false,
---@usage disable when insert after visual block mode
disable_in_visualblock = false,
disable_in_replace_mode = true,
ignored_next_char = string.gsub([[ [%w%%%'%[%"%.] ]], "%s+", ""),
enable_moveright = true,
---@usage add bracket pairs after quote
enable_afterquote = true,
---@usage trigger abbreviation
enable_abbr = false,
---@usage switch for basic rule break undo sequence
break_undo = true,
map_cr = true,
---@usage map the <BS> key
map_bs = true,
---@usage map <c-w> to delete a pair if possible
map_c_w = false,
---@usage disable when insert after visual block mode
disable_in_visualblock = false,
---@usage Map the <C-h> key to delete a pair
map_c_h = false,
---@usage change default fast_wrap
fast_wrap = {
map = "<M-e>",
Expand Down
25 changes: 13 additions & 12 deletions lua/lvim/core/breadcrumbs.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
local M = {}

-- local Log = require "lvim.core.log"

local icons = lvim.icons.kind

M.config = function()
Expand Down Expand Up @@ -94,18 +93,21 @@ M.setup = function()
end
end

local function isempty(s)
return s == nil or s == ""
end

M.get_filename = function()
local filename = vim.fn.expand "%:t"
local extension = vim.fn.expand "%:e"
local f = require "lvim.utils.functions"

if not f.isempty(filename) then
if not isempty(filename) then
local file_icon, hl_group
local devicons_ok, devicons = pcall(require, "nvim-web-devicons")
if lvim.use_icons and devicons_ok then
file_icon, hl_group = devicons.get_icon(filename, extension, { default = true })

if f.isempty(file_icon) then
if isempty(file_icon) then
file_icon = lvim.icons.kind.File
end
else
Expand Down Expand Up @@ -135,8 +137,8 @@ M.get_filename = function()
-- file_icon = lvim.icons.ui.DebugConsole
-- end

local navic_text = vim.api.nvim_get_hl_by_name("Normal", true)
vim.api.nvim_set_hl(0, "Winbar", { fg = navic_text.foreground })
local navic_text_hl = vim.api.nvim_get_hl(0, { name = "Normal" })
vim.api.nvim_set_hl(0, "Winbar", { fg = navic_text_hl.fg })

return " " .. "%#" .. hl_group .. "#" .. file_icon .. "%*" .. " " .. "%#Winbar#" .. filename .. "%*"
end
Expand All @@ -157,7 +159,7 @@ local get_gps = function()
return ""
end

if not require("lvim.utils.functions").isempty(gps_location) then
if not isempty(gps_location) then
return "%#NavicSeparator#" .. lvim.icons.ui.ChevronRight .. "%* " .. gps_location
else
return ""
Expand All @@ -172,19 +174,18 @@ M.get_winbar = function()
if excludes() then
return
end
local f = require "lvim.utils.functions"
local value = M.get_filename()

local gps_added = false
if not f.isempty(value) then
if not isempty(value) then
local gps_value = get_gps()
value = value .. " " .. gps_value
if not f.isempty(gps_value) then
if not isempty(gps_value) then
gps_added = true
end
end

if not f.isempty(value) and f.get_buf_option "mod" then
if not isempty(value) and vim.api.nvim_get_option_value("mod", { buf = 0 }) then
-- TODO: replace with circle
local mod = "%#LspCodeLens#" .. lvim.icons.ui.Circle .. "%*"
if gps_added then
Expand All @@ -196,7 +197,7 @@ M.get_winbar = function()

local num_tabs = #vim.api.nvim_list_tabpages()

if num_tabs > 1 and not f.isempty(value) then
if num_tabs > 1 and not isempty(value) then
local tabpage_number = tostring(vim.api.nvim_tabpage_get_number(0))
value = value .. "%=" .. tabpage_number .. "/" .. tostring(num_tabs)
end
Expand Down
11 changes: 10 additions & 1 deletion lua/lvim/core/bufferline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ M.config = function()
},
},
options = {
themable = true, -- whether or not bufferline highlights can be overridden externally
-- style_preset = preset,
get_element_icon = nil,
show_duplicate_prefix = true,
duplicates_across_groups = true,
auto_toggle_bufferline = true,
move_wraps_at_ends = false,
groups = { items = {}, options = { toggle_hidden_on_enter = true } },
mode = "buffers", -- set to "tabs" to only show tabpages instead
numbers = "none", -- can be "none" | "ordinal" | "buffer_id" | "both" | function
close_command = function(bufnr) -- can be a string | function, see "Mouse actions"
Expand Down Expand Up @@ -140,6 +148,7 @@ M.config = function()
reveal = { "close" },
},
sort_by = "id",
debug = { logging = false },
},
}
end
Expand Down Expand Up @@ -198,7 +207,7 @@ function M.buf_kill(kill_command, bufnr, force)
force = true
else return
end
elseif api.nvim_buf_get_option(bufnr, "buftype") == "terminal" then
elseif api.nvim_get_option_value("buftype", { buf = 0 }) == "terminal" then
choice = fn.confirm(fmt([[Close "%s"?]], bufname), "&Yes\n&No\n&Cancel")
if choice == 1 then
force = true
Expand Down
2 changes: 1 addition & 1 deletion lua/lvim/core/cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ M.config = function()
active = true,
on_config_done = nil,
enabled = function()
local buftype = vim.api.nvim_buf_get_option(0, "buftype")
local buftype = vim.api.nvim_get_option_value("buftype", { buf = 0 })
if buftype == "prompt" then
return false
end
Expand Down
Loading

0 comments on commit 5844bc8

Please sign in to comment.