Skip to content

Commit

Permalink
Merge branch 'main' into v4-fix
Browse files Browse the repository at this point in the history
feat(java): Migrate new java pack logic over to astrolsp
  • Loading branch information
Uzaaft committed Aug 29, 2023
2 parents 1bf0faa + ba3ea51 commit 8daaf10
Show file tree
Hide file tree
Showing 22 changed files with 210 additions and 90 deletions.
61 changes: 23 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,31 @@
name: CI

name: AstroNvim
on:
push:
branches: [main]
branches: ["main"]
pull_request:

jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
# CLI arguments
args: --check .
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: lunarmodules/luacheck@v1
release:
name: release

if: ${{ github.ref == 'refs/heads/main' }}
needs:
- style
- lint
scopes:
name: Calculate scopes
runs-on: ubuntu-latest
outputs:
scopes: ${{ steps.get-scopes.outputs.scopes }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
token: ${{ secrets.RELEASE_TOKEN }}
release-type: simple
package-name: astrocommunity
- uses: actions/checkout@v3
- uses: rickstaa/action-create-tag@v1
if: ${{ steps.release.outputs.release_created }}
with:
tag: stable
message: "Current stable release: ${{ steps.release.outputs.tag_name }}"
tag_exists_error: false
force_push_tag: true
- id: get-scopes
run: |
echo "scopes<<EOF" >> $GITHUB_OUTPUT
find lua/astrocommunity -mindepth 1 -maxdepth 2 -type d -exec basename {} \; >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
CI:
uses: AstroNvim/.github/.github/workflows/plugin_ci.yml@main
secrets: inherit
needs: scopes
with:
plugin_name: ${{ github.event.repository.name }}
is_production: ${{ github.event_name == 'push' }}
docs: false
spellcheck: false
commit_msg: false
pr_title: true
scopes: ${{ needs.scopes.outputs.scopes }}
35 changes: 0 additions & 35 deletions .github/workflows/semantic_pr.yml

This file was deleted.

53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,58 @@
# Changelog

## [3.4.0](https://github.com/AstroNvim/astrocommunity/compare/v3.3.0...v3.4.0) (2023-08-06)


### Features

* **editing-support:** add yanky.nvim ([#486](https://github.com/AstroNvim/astrocommunity/issues/486)) ([299fe33](https://github.com/AstroNvim/astrocommunity/commit/299fe33ca31e81d61716af4602f631434990fb3d))
* **pack:** Add Scala language pack ([#501](https://github.com/AstroNvim/astrocommunity/issues/501)) ([b98fde2](https://github.com/AstroNvim/astrocommunity/commit/b98fde28477a38f18708c9222a0cffa6999f5b2d))
* **pack:** Adding helm pack ([#496](https://github.com/AstroNvim/astrocommunity/issues/496)) ([f8fbe84](https://github.com/AstroNvim/astrocommunity/commit/f8fbe8404559e8314b4096cffa20e20c1f08fbfe))
* **pack:** enable hot reloading in java and show java lsp progress ([#504](https://github.com/AstroNvim/astrocommunity/issues/504)) ([fbf40f4](https://github.com/AstroNvim/astrocommunity/commit/fbf40f402e4958e681d65d90276156ef11b2eda9))
* **programming-language-support:** Add dooku.nvim ([#503](https://github.com/AstroNvim/astrocommunity/issues/503)) ([6deb350](https://github.com/AstroNvim/astrocommunity/commit/6deb3507274eb0410641d2050af5c1f8a8e929ad))
* **zen-mode-nvim:** add integration with vim-matchup if enabled ([#485](https://github.com/AstroNvim/astrocommunity/issues/485)) ([4671c39](https://github.com/AstroNvim/astrocommunity/commit/4671c3978e132030f49c454a168a1f84e233ea06))


### Bug Fixes

* **go:** Add extra treesitter languages for Go ([#495](https://github.com/AstroNvim/astrocommunity/issues/495)) ([7d7f82a](https://github.com/AstroNvim/astrocommunity/commit/7d7f82aab2b41af9e17b14a05488ac78991e11df))
* **multicursors-nvim:** support MCstart in visual mode ([#492](https://github.com/AstroNvim/astrocommunity/issues/492)) ([d5822bb](https://github.com/AstroNvim/astrocommunity/commit/d5822bb2fe3bed39b731e827f3c1c6e9bed0418c))
* **neogit:** move check into code rather than docs ([#494](https://github.com/AstroNvim/astrocommunity/issues/494)) ([e365cdf](https://github.com/AstroNvim/astrocommunity/commit/e365cdf50e7edfce953b071d624283e326e710e4))
* **refactoring-nvim:** add select mode to mappings. remove conflicting ([#499](https://github.com/AstroNvim/astrocommunity/issues/499)) ([c59b7a7](https://github.com/AstroNvim/astrocommunity/commit/c59b7a7c87aa451799b3949e71b8537ad152d33d))


### Reverts

* use `&lt;C-j&gt;` for copilot acceptance ([#507](https://github.com/AstroNvim/astrocommunity/issues/507)) ([213ddc3](https://github.com/AstroNvim/astrocommunity/commit/213ddc3a8fe586f665cbb4c5f9db3a23fae8ad59))

## [3.3.0](https://github.com/AstroNvim/astrocommunity/compare/v3.2.0...v3.3.0) (2023-07-23)


### Features

* **catppuccin:** enable catppuccin integrations automatically ([#457](https://github.com/AstroNvim/astrocommunity/issues/457)) ([5ffae06](https://github.com/AstroNvim/astrocommunity/commit/5ffae06c6952047c254893c01a8fddb7dea7bb03))
* **color:** add mini-hipatterns ([#453](https://github.com/AstroNvim/astrocommunity/issues/453)) ([881847d](https://github.com/AstroNvim/astrocommunity/commit/881847dc95cc691ecf92581762e73db9c223c6c7))
* **debugging:** add nvim-dap-repl-highlights ([#454](https://github.com/AstroNvim/astrocommunity/issues/454)) ([2c8ecc9](https://github.com/AstroNvim/astrocommunity/commit/2c8ecc911eb9dcd508d854c37b97584bf4b5415d))
* **editing-support:** add nvim-neoclip plugin ([#450](https://github.com/AstroNvim/astrocommunity/issues/450)) ([4ebda64](https://github.com/AstroNvim/astrocommunity/commit/4ebda647617c4fac82250f6412d4fbec173b12e2))
* **editing-support:** add treesitter endwise ([#466](https://github.com/AstroNvim/astrocommunity/issues/466)) ([95a580d](https://github.com/AstroNvim/astrocommunity/commit/95a580d2058823f446154b22824668398a55c58d))
* **fuzzy-finder:** add telescope-zoxide ([#452](https://github.com/AstroNvim/astrocommunity/issues/452)) ([5975749](https://github.com/AstroNvim/astrocommunity/commit/5975749ed50bfd10cdd81cd69a8552214df1877a))
* **lsp:** add ray-x/lsp_signature.nvim ([#470](https://github.com/AstroNvim/astrocommunity/issues/470)) ([e1ccbdc](https://github.com/AstroNvim/astrocommunity/commit/e1ccbdc26c3d1e2f4773d728f05ee4fb557508ba))
* **neogit:** enable neogit integrations if they are available ([#456](https://github.com/AstroNvim/astrocommunity/issues/456)) ([3102b7c](https://github.com/AstroNvim/astrocommunity/commit/3102b7c637f7c60edadeecf81fcb34f78be75c76))
* **php:** Add `php-cs-fixer` as formatter for php ([#476](https://github.com/AstroNvim/astrocommunity/issues/476)) ([81d63af](https://github.com/AstroNvim/astrocommunity/commit/81d63af9399967f3ecc58251e4d3910ad46aaf6f))
* **typescript:** Add support for dap for JS ([#475](https://github.com/AstroNvim/astrocommunity/issues/475)) ([9bd1e3e](https://github.com/AstroNvim/astrocommunity/commit/9bd1e3ee6a622b3d671cb7217089a5ab0fc33365))
* **vim-matchup:** improve offscreen popup style ([#474](https://github.com/AstroNvim/astrocommunity/issues/474)) ([d571aa8](https://github.com/AstroNvim/astrocommunity/commit/d571aa8b8764bae2f0089fcef31d6e3fce75ccab))


### Bug Fixes

* **catppuccin:** add recommended telescope config ([#471](https://github.com/AstroNvim/astrocommunity/issues/471)) ([bcb8296](https://github.com/AstroNvim/astrocommunity/commit/bcb82962d283c526e6c92da5821a246d18074892))
* **catppuccin:** enable alpha.nvim by default ([#459](https://github.com/AstroNvim/astrocommunity/issues/459)) ([23dce80](https://github.com/AstroNvim/astrocommunity/commit/23dce805c6691540a69a4706c2df2816ba6daf2e))
* **chatgpt-nvim:** typo in `dependencies` key ([#461](https://github.com/AstroNvim/astrocommunity/issues/461)) ([ae0c6b6](https://github.com/AstroNvim/astrocommunity/commit/ae0c6b6cfdba1f0c7400742ce71e50a9fac0d438))
* **mini-indentscope:** ignore more filetypes ([#458](https://github.com/AstroNvim/astrocommunity/issues/458)) ([946c4e3](https://github.com/AstroNvim/astrocommunity/commit/946c4e37ec967cf7200a2361b5a4662582616912))
* **nvim-toggler:** add lazy load on keys ([#464](https://github.com/AstroNvim/astrocommunity/issues/464)) ([c343448](https://github.com/AstroNvim/astrocommunity/commit/c343448334d8dfacae79f33eb0eff856b9880703))
* **portal-nvim:** lazy load on cmd ([#469](https://github.com/AstroNvim/astrocommunity/issues/469)) ([ca6991a](https://github.com/AstroNvim/astrocommunity/commit/ca6991aa62457202a65ee78b0d88b73524506148))
* **scope-nvim:** Register extension with Telescope ([#467](https://github.com/AstroNvim/astrocommunity/issues/467)) ([79ad146](https://github.com/AstroNvim/astrocommunity/commit/79ad1468bcef48372d6e1df3e5b331405892e4be))

## [3.2.0](https://github.com/AstroNvim/astrocommunity/compare/v3.1.1...v3.2.0) (2023-07-16)


Expand Down
15 changes: 14 additions & 1 deletion lua/astrocommunity/bars-and-lines/bufferline-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
return {
{ "akinsho/bufferline.nvim", event = "VeryLazy", opts = {} },
{
"akinsho/bufferline.nvim",
event = "VeryLazy",
opts = {
offsets = {
{
filetype = "neo-tree",
text = "Neo-tree",
highlight = "Directory",
text_align = "left",
},
},
},
},
{
"rebelot/heirline.nvim",
optional = true,
Expand Down
11 changes: 11 additions & 0 deletions lua/astrocommunity/colorscheme/nord-nvim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,14 @@
Neovim theme based off of the Nord Color Palette, written in lua with tree sitter support

**Repository:** <https://github.com/shaunsingh/nord.nvim>

**Note:** Until the maintainer fixes the problem, the theme is incompatible with semantic tokens ([issue](https://github.com/shaunsingh/nord.nvim/issues/143), you therefore have to turn off the feature otherwise many tokens will be the same color. (put this in the `polish` function of `lua/user/init.lua`:

```
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
client.server_capabilities.semanticTokensProvider = nil
end,
})
```
30 changes: 28 additions & 2 deletions lua/astrocommunity/editing-support/auto-save-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
return {
"Pocco81/auto-save.nvim",
-- "Pocco81/auto-save.nvim",
"zoriya/auto-save.nvim", -- HACK: use fork until PR is accepted
event = { "User AstroFile", "InsertEnter" },
opts = {},
opts = {
callbacks = {
before_saving = function()
-- save global autoformat status
vim.g.OLD_AUTOFORMAT = vim.g.autoformat_enabled

vim.g.autoformat_enabled = false
vim.g.OLD_AUTOFORMAT_BUFFERS = {}
-- disable all manually enabled buffers
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
if vim.b[bufnr].autoformat_enabled then
table.insert(vim.g.OLD_BUFFER_AUTOFORMATS, bufnr)
vim.b[bufnr].autoformat_enabled = false
end
end
end,
after_saving = function()
-- restore global autoformat status
vim.g.autoformat_enabled = vim.g.OLD_AUTOFORMAT
-- reenable all manually enabled buffers
for _, bufnr in ipairs(vim.g.OLD_AUTOFORMAT_BUFFERS or {}) do
vim.b[bufnr].autoformat_enabled = true
end
end,
},
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ return {
opts = {},
keys = {
{
mode = { "v", "n" },
"<Leader>m",
"<cmd>MCstart<cr>",
desc = "Create a selection for word under the cursor",
Expand Down
5 changes: 5 additions & 0 deletions lua/astrocommunity/editing-support/yanky-nvim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# yanky.nvim

Improved Yank and Put functionalities for Neovim.

**Repository:** <https://github.com/gbprod/yanky.nvim>
4 changes: 4 additions & 0 deletions lua/astrocommunity/editing-support/zen-mode-nvim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@

🧘 Distraction-free coding for Neovim

Disables diagnostics, indentation, and winbar when entering Zen Mode.

Optionally disables [mini.indentscope](https://github.com/echasnovski/mini.indentscope) and offscreen matchups for [vim-matchup](https://github.com/andymass/vim-matchup), if installed.

**Repository:** <https://github.com/folke/zen-mode.nvim>
18 changes: 16 additions & 2 deletions lua/astrocommunity/editing-support/zen-mode-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local utils = require "astronvim.utils"

return {
"folke/zen-mode.nvim",
cmd = "ZenMode",
Expand All @@ -21,7 +23,7 @@ return {
laststatus = 0,
},
},
on_open = function() -- disable diagnostics, indent blankline, and winbar
on_open = function() -- disable diagnostics, indent blankline, winbar, and offscreen matchup
vim.g.diagnostics_mode_old = vim.g.diagnostics_mode
vim.g.diagnostics_mode = 0
vim.diagnostic.config(require("astrocore.utils.lsp").diagnostics[vim.g.diagnostics_mode])
Expand All @@ -38,8 +40,15 @@ return {
group = vim.api.nvim_create_augroup("disable_winbar", { clear = true }),
desc = "Ensure winbar stays disabled when writing to file, switching buffers, opening floating windows, etc.",
})

if utils.is_available "vim-matchup" then
vim.cmd.NoMatchParen()
vim.g.matchup_matchparen_offscreen_old = vim.g.matchup_matchparen_offscreen
vim.g.matchup_matchparen_offscreen = {}
vim.cmd.DoMatchParen()
end
end,
on_close = function() -- restore diagnostics, indent blankline, and winbar
on_close = function() -- restore diagnostics, indent blankline, winbar, and offscreen matchup
vim.g.diagnostics_mode = vim.g.diagnostics_mode_old
vim.diagnostic.config(require("astrocore.utils.lsp").diagnostics[vim.g.diagnostics_mode])

Expand All @@ -49,6 +58,11 @@ return {

vim.api.nvim_clear_autocmds { group = "disable_winbar" }
vim.wo.winbar = vim.g.winbar_old

if utils.is_available "vim-matchup" then
vim.g.matchup_matchparen_offscreen = vim.g.matchup_matchparen_offscreen_old
vim.cmd.DoMatchParen()
end
end,
},
}
1 change: 1 addition & 0 deletions lua/astrocommunity/git/neogit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ magit for neovim
**Repository:** <https://github.com/TimUntersberger/neogit>

A work-in-progress Magit clone for Neovim that is geared toward the Vim philosophy.

4 changes: 3 additions & 1 deletion lua/astrocommunity/git/neogit/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ return {
},
event = "User AstroGitFile",
opts = function(_, opts)
local disable_builtin_notifications = utils.is_available "nvim-notify" or utils.is_available "noice.nvim"

return utils.extend_tbl(opts, {
disable_builtin_notifications = utils.is_available "nvim-notify",
disable_builtin_notifications = disable_builtin_notifications,
telescope_sorter = function()
if utils.is_available "telescope-fzf-native.nvim" then
return require("telescope").extensions.fzf.native_fzf_sorter()
Expand Down
2 changes: 1 addition & 1 deletion lua/astrocommunity/pack/ansible/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ return {
init = function()
local function yaml_ft(path, bufnr)
-- get content of buffer as string
local content = vim.filetype.getlines(bufnr)
local content = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
if type(content) == "table" then content = table.concat(content, "\n") end

-- check if file is in roles, tasks, or handlers folder
Expand Down
2 changes: 1 addition & 1 deletion lua/astrocommunity/pack/go/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ return {
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if opts.ensure_installed ~= "all" then
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "go")
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "go", "gomod", "gosum", "gowork")
end
end,
},
Expand Down
7 changes: 7 additions & 0 deletions lua/astrocommunity/pack/helm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Helm Language Pack

This plugin pack does the following:

- Adds `go-template` Treesitter parsers
- Adds `helm-ls` language server
- Adds [vim-helm](https://github.com/towolf/vim-helm) for language specific tools
1 change: 1 addition & 0 deletions lua/astrocommunity/pack/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ This plugin pack does the following:
- Adds `jdtls` language server
- Adds `lemminx` language server (XML)
- Adds [nvim-jdtls](https://github.com/mfussenegger/nvim-jdtls) for language specific tooling
- Enables [hot reloading](https://github.com/mfussenegger/nvim-jdtls/issues/80)
- Adds `clang_format` through null-ls
- Adds `javadbg` and `javatest` debug adapters for nvim-dap
5 changes: 1 addition & 4 deletions lua/astrocommunity/pack/java/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,13 @@ return {
},
},
handlers = {
["language/status"] = function()
-- print(result)
end,
["$/progress"] = function()
-- disable progress updates.
end,
},
filetypes = { "java" },
on_attach = function(client, bufnr)
require("jdtls").setup_dap()
require("jdtls").setup_dap { hotcodereplace = "auto" }
require("astrolsp").on_attach(client, bufnr)
end,
}
Expand Down
1 change: 1 addition & 0 deletions lua/astrocommunity/pack/rust/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ return {
},
{
"Saecki/crates.nvim",
event = { "BufRead Cargo.toml" },
init = function()
vim.api.nvim_create_autocmd("BufRead", {
group = vim.api.nvim_create_augroup("CmpSourceCargo", { clear = true }),
Expand Down
12 changes: 12 additions & 0 deletions lua/astrocommunity/pack/scala/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Scala Language Pack

Requires:

- `metals` or `coursier` in your path

This plugin pack does the following:

- Adds `scala` treesitter parsers
- Adds `metals` language server
- Adds debugger for scala to `nvim-dap`
- Adds [nvim-metals](https://github.com/scalameta/nvim-metals) for language specific tooling
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# dooku.nvim

Generate and open your code HTML documentation inside Neovim.

**Repository:** <https://github.com/Zeioth/dooku.nvim>
Loading

0 comments on commit 8daaf10

Please sign in to comment.