Skip to content

Commit

Permalink
Merge branch 'main' into fix-duplicate-diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
lucazz authored Mar 18, 2024
2 parents 3ec4d41 + c730a7e commit bb911e6
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 16 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: Uzaaft
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ If you wish to contribute to AstroCommunity, you should:
- When adding a new plugin, we are trying our best to use categories as used by [NeovimCraft](https://neovimcraft.com/). Please check there to see if your plugin exists and use the category they use. If there the plugin isn't available use the best fit category and we can discuss the organization on the pull request.
- When adding a new plugin, please add any notes/caveats that the user should be aware of inside the accompanying `README.md` file. Notes and caveats could include:
- Example of a useful LSP config for a language pack.
- The plugins being used in the pack doesn't support a specific SDK/Version of that language.
## How to remove, squash, or edit commits from your PR
> You may have been directed here to remove a commit such as a merge commit: `Merge astrocommunity/main into devBranch` from your PR
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
return {
"iamcco/markdown-preview.nvim",
build = "cd app && npm install",
build = "cd app && yarn install",
ft = "markdown",
}
9 changes: 5 additions & 4 deletions lua/astrocommunity/motion/grapple-nvim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Neovim plugin for tagging important files
**Repository:** <https://github.com/cbochs/grapple.nvim>

### Example of a custom Heirline component for AstroNvim

![image](https://github.com/Subjective/astrocommunity/assets/56745535/333069eb-dea7-428f-b28d-31fd5912f95f)

```lua
Expand All @@ -14,13 +15,14 @@ status.component.grapple = {
provider = function()
local available, grapple = pcall(require, "grapple")
if available then
local key = grapple.key { buffer = 0 }
if key ~= nil then return "" .. key .. " " end
return grapple.statusline()
end
end,
}
```

**Example Configuration:**

```lua
return {
plugins = {
Expand All @@ -34,8 +36,7 @@ return {
provider = function()
local available, grapple = pcall(require, "grapple")
if available then
local key = grapple.key { buffer = 0 }
if key ~= nil then return "" .. key .. " " end
return grapple.statusline()
end
end,
}
Expand Down
21 changes: 12 additions & 9 deletions lua/astrocommunity/motion/grapple-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ maps.n[prefix] = { desc = icon .. "Grapple" }
require("astronvim.utils").set_mappings(maps)
return {
"cbochs/grapple.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
dependencies = {
{ "nvim-tree/nvim-web-devicons", lazy = true },
},
cmd = { "Grapple" },
keys = {
{ prefix .. "a", "<cmd>GrappleTag<CR>", desc = "Add file" },
{ prefix .. "d", "<cmd>GrappleUntag<CR>", desc = "Remove file" },
{ prefix .. "t", "<cmd>GrappleToggle<CR>", desc = "Toggle a file" },
{ prefix .. "e", "<cmd>GrapplePopup tags<CR>", desc = "Select from tags" },
{ prefix .. "s", "<cmd>GrapplePopup scopes<CR>", desc = "Select a project scope" },
{ prefix .. "x", "<cmd>GrappleReset<CR>", desc = "Clear tags from current project" },
{ "<C-n>", "<cmd>GrappleCycle forward<CR>", desc = "Select next tag" },
{ "<C-p>", "<cmd>GrappleCycle backward<CR>", desc = "Select previous tag" },
{ prefix .. "a", "<cmd>Grapple tag<CR>", desc = "Add file" },
{ prefix .. "d", "<cmd>Grapple untag<CR>", desc = "Remove file" },
{ prefix .. "t", "<cmd>Grapple toggle<CR>", desc = "Toggle a file" },
{ prefix .. "e", "<cmd>Grapple toggle_tags<CR>", desc = "Select from tags" },
{ prefix .. "s", "<cmd>Grapple toggle_scopes<CR>", desc = "Select a scope" },
{ prefix .. "l", "<cmd>Grapple toggle_loaded<CR>", desc = "Select a loaded scope" },
{ prefix .. "x", "<cmd>Grapple reset<CR>", desc = "Clear tags from current project" },
{ "<C-n>", "<cmd>Grapple cycle forward<CR>", desc = "Select next tag" },
{ "<C-p>", "<cmd>Grapple cycle backward<CR>", desc = "Select previous tag" },
},
}
2 changes: 1 addition & 1 deletion lua/astrocommunity/pack/nix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Requires the following in your `PATH`
This plugin pack does the following:

- Adds `nix` Treesitter parsers
- Adds `rnix` language server
- Adds `nil_ls` language server
- Adds the following `null-ls` sources:
- [alejandra](https://github.com/kamadorueda/alejandra)
- [deadnix](https://github.com/astro/deadnix)
Expand Down
3 changes: 2 additions & 1 deletion lua/astrocommunity/pack/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ If you'd like to run cargo clippy instead of cargo check on safe, add the follow
config = {
rust_analyzer = {
settings = {
-- Add clippy lints for Rust.
-- Add clippy lints for Rust.
["rust-analyzer"] = {
checkOnSave = {
allFeatures = true,
command = "clippy",
Expand Down
6 changes: 6 additions & 0 deletions lua/astrocommunity/pack/templ/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Templ Language Pack

This plugin pack does the following:

- Adds `templ` treesitter parser
- Adds `templ` language server
18 changes: 18 additions & 0 deletions lua/astrocommunity/pack/templ/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
vim.filetype.add { extension = { templ = "templ" } }
local utils = require "astronvim.utils"

return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
-- Ensure that opts.ensure_installed exists and is a table or string "all".
if opts.ensure_installed ~= "all" then
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "templ")
end
end,
},
{
"williamboman/mason-lspconfig.nvim",
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "templ") end,
},
}
10 changes: 10 additions & 0 deletions neovim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
base: lua51

globals:
vim:
any: true
jit:
any: true
astronvim:
any: true
8 changes: 8 additions & 0 deletions selene.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
std = "neovim"

[rules]
global_usage = "allow"
if_same_then_else = "allow"
incorrect_standard_library_use = "allow"
mixed_table = "allow"
multiple_statements = "allow"

0 comments on commit bb911e6

Please sign in to comment.