Compare commits

..

No commits in common. "c727528b6fb001f04d311de7b6d7f1be0b08b5cd" and "bce45d4eeb82b3c2d68c555e972bb4c376e29738" have entirely different histories.

11 changed files with 81 additions and 294 deletions

192
.github/README.md vendored
View file

@ -33,9 +33,10 @@
<div align="center"> <div align="center">
<a> <a>
nvf is a highly modular, configurable, extensible and easy to use Neovim configuration A highly modular, configurable, extensible and easy to use Neovim configuration
in Nix. Designed for flexibility and ease of use, nvf allows you to easily configure framework in Nix. Designed for flexibility and ease of use, this flake
your fully featured Neovim instance with a few lines of Nix. allows you to easily configure your Neovim instance with a few lines of
Nix code.
</a> </a>
</div> </div>
@ -43,7 +44,6 @@
<div align="center"><p> <div align="center"><p>
[Features]: #features
[Get Started]: #get-started [Get Started]: #get-started
[Documentation]: #documentation [Documentation]: #documentation
[Help]: #help [Help]: #help
@ -51,150 +51,119 @@
[FAQ]: #faq [FAQ]: #faq
[Credits]: #credits [Credits]: #credits
**[<kbd><br>Features <br></kbd>][Features]** **[<kbd><br>Get Started<br></kbd>][Get Started]**
**[<kbd><br>Get Started<br></kbd>][Get Started]** **[<kbd><br>Documentation<br></kbd>][Documentation]**
**[<kbd><br>Documentation<br></kbd>][Documentation]** **[<kbd><br>Help<br></kbd>][Help]**
**[<kbd><br>Help<br></kbd>][Help]** **[<kbd><br>Contribute<br></kbd>][Contribute]**
**[<kbd><br>Contribute<br></kbd>][Contribute]** **[<kbd><br>FAQ<br></kbd>][Faq]**
**[<kbd><br>FAQ<br></kbd>][Faq]** **[<kbd><br>Credits<br></kbd>][Credits]** **[<kbd><br>Credits<br></kbd>][Credits]**
</p></div> </p></div>
--- ---
## Features
- **Reproducible**: Your configuration will behave the same _anywhere_. No
surprises, promise!
- **Portable**: nvf depends _solely_ on your Nix store, and nothing else. No
more global binaries! Works on all platforms, without hassle.
- **Customizable**: There are _almost no defaults_ to annoy you. nvf is fully
customizable through the Nix module system.
- **Well-documented**: Documentation is priority. You will _never_ face
undocumented, obscure behaviour.
- **Idiomatic**: nvf does things ✨ _the right way_ ✨ - the codebase is, and
will, remain maintainable for myself and any contributors.
## Get Started ## Get Started
[nvf manual]: https://notashelf.github.io/nvf/ ### Using `nix` CLI
[issue tracker]: https://github.com/NotAShelf/nvf/issues
If you are not sold on the concepts of **nvf**, and would like to try out the If you would like to try out the configuration before even thinking about
default configuration before even _thinking about_ installing it, you may run installing it, you can run the following command
the following in order to take **nvf** out for a spin.
```bash ```console
# Run the default package
nix run github:notashelf/nvf nix run github:notashelf/nvf
``` ```
This will get you a feel for the base configuration and UI design. Though, none This will get you a feel for the base configuration and UI design.
of the configuration options are final as **nvf** is designed to be modular and The flake exposes `#nix` as the default package, providing minimal
configurable. language support and various utilities.You may also use `#nix`,
`#tidal` or `#maximal` to get try out different configurations.
> [!TIP] It is as simple as changing the target output to get a different
> The flake exposes `#nix` as the default package, providing minimal language configuration. For example, to get a configuration with `tidal` support, run:
> support and various utilities. You may also use the `#nix` or `#maximal`
> packages provided by the this flake to get try out different configurations.
It is as simple as changing the target output to get a different configuration. ```console
For example, to get a configuration with large language coverage, run: nix run github:notashelf/nvf#tidal
```bash
# Run the maximal package
nix run github:notashelf/nvf#maximal
``` ```
Similar instructions will apply for `nix profile install`. However, you are Similar instructions will apply for `nix profile install`. However, you are
recommended to instead use the module system as described in the manual. recommended to instead use the module system as described in the manual.
> [!NOTE] > [!NOTE]
> The `maximal` configuration is quite large, and might take a while to build. > The `maximal` configuration is _massive_ and will take a while to build.
> To get a feel for the configuration, use the default `nix` configuration. > To get a feel for the configuration, use the default `nix` or `tidal`
> Should you choose to try out the `maximal` configuration, using the binary > configurations. Should you choose to try out the `maximal` configuration,
> cache as described in the manual is _strongly_ recommended. > using the binary cache as described in the manual is _strongly_ recommended.
If you are convinced, proceed to the next section to view the installation
instructions.
## Documentation ## Documentation
The _recommended_ way of installing **nvf** is using either the NixOS or the See the [**nvf** Manual](https://notashelf.github.io/nvf/) for
Home-Manager module, though it is completely possible and no less supported to detailed installation guides, configurations, available options, release notes
install **nvf** as a standalone package, or a flake output. and more. Tips for installing userspace plugins is also contained in the
documentation.
See the [**nvf** manual] for detailed and up-to-date installation guides, If you want to dive right into trying **nvf** you can get a fully
configurations, available options, release notes and more. Tips for installing featured configuration with `nix` language support by running:
userspace plugins is also contained in the documentation.
Please create an issue on the [issue tracker] if you find the documentation ```console
lacking or confusing. Any improvements to the documentation through pull nix run github:notashelf/nvf#nix
requests are also welcome, and appreciated. ```
[Issues]: https://github.com/NotAShelf/nvf/issues
Please create an issue on the [issue tracker](issues) if you find
the documentation lacking or confusing. I also appreciate any contributions
to the documentation.
## Help ## Help
You can create an issue on the [issue tracker] to ask questions or report bugs. You can create an issue on the [issue tracker](issues) to ask questions
I am not yet on spaces like matrix or IRC, so please use the issue tracker for or report bugs. I am not yet on spaces like matrix or IRC, so please use the issue
now. tracker for now.
## Contributing ## Contributing
I am always looking for new ways to help improve this flake. If you would like I am always looking for new ways to help improve this flake. If you would like
to contribute, please read the [contributing guide](CONTRIBUTING.md) before to contribute, please read the [contributing guide](CONTRIBUTING.md) before
submitting a pull request. You can also create an issue on the [issue tracker] submitting a pull request. You can also create an issue on the
before submitting a pull request if you would like to discuss a feature or bug [issue tracker](issues) before submitting a pull request if you would
fix. like to discuss a feature or bug fix.
## FAQ ## FAQ
[appropriate issue template]: https://github.com/NotAShelf/nvf/issues/new/choose
[list of branches]: https://github.com/NotAShelf/nvf/branches
[list of open pull requests]: https://github.com/NotAShelf/nvf/pulls
**Q**: What platforms are supported?
<br/> **A**: nvf actively supports Linux and Darwin platforms using standalone
Nix, NixOS or Home-Manager. Please take a look at the
**Q**: Can you add _X_? **Q**: Can you add _X_?
<br/> **A**: Maybe! It is not one of our goals to support each and every Neovim <br/>
plugin, however, I am always open to new modules and plugin setup additions to **A**: Maybe! It is not one of our goals to support each and every Neovim
**nvf**. Use the [appropriate issue template] and I will consider a module plugin, however, I am always open to new modules and plugin setup additions
addition. As mentioned before, PRs adding new features are also welcome. to **nvf**. Use the [appropritate issue template](issues/new/choose) and I will
consider a module addition.
**Q**: A plugin I need is not available in **nvf**. What to do? **Q**: A plugin I need is not available in **nvf**. What to do?
<br/> **A**: **nvf** exposes several APIs for you to be able to add your own <br/>
plugin configurations! Please see the documentation on how you may do this. **A**: **nvf** exposes several APIs for you to be able to add your own
plugin configurations! Please see the documentation on how you may do
this.
**Q**: Main branch is awfully silent, is the project dead? **Q**: Main branch is awfully silent, is the project dead?
<br/> **A**: No! Sometimes we branch out (e.g. `v0.6`) to avoid breaking <br/>
userspace and work in a separate branch until we make sure the new additions are **A**: No! Sometimes we branch out (e.g. v0.6) to avoid breaking userspace
implemented in the most comfortable way possible for the end user. If you have and work in a separate branch until we make sure the new additions are
not noticed any activity on the main branch, consider taking a look at the implemented in the most comfortable way available to the end user. If you have
[list of branches] or the [list of open pull requests]. You may also consider not noticed any activity on the main branch, consider taking a look at the [list
_testing_ those release branches to get access to new features ahead of time and of branches](https://github.com/NotAShelf/nvf/branches=) or the [list of open
better prepare to breaking changes. pull requests](https://github.com/NotAShelf/nvf)
## Credits ## Credits
### Contributors ### Contributors
Special, heart-felt thanks to Special thanks to
- [@fufexan](https://github.com/fufexan) - For the transition to flake-parts - [@fufexan](https://github.com/fufexan) - For the transition to flake-parts
- [@FlafyDev](https://github.com/FlafyDev) - For getting the home-manager to - [@FlafyDev](https://github.com/FlafyDev) - For getting the home-manager to work
work - [@n3oney](https://github.com/n3oney) - For making custom keybinds finally possible
- [@n3oney](https://github.com/n3oney) - For making custom keybinds finally - [@horriblename](https://github.com/horriblename) - For actively implementing planned features and quality of life updates
possible
- [@horriblename](https://github.com/horriblename) - For actively implementing
planned features and quality of life updates
- [@Yavko](https://github.com/Yavko) - For the amazing **nvf** logo - [@Yavko](https://github.com/Yavko) - For the amazing **nvf** logo
- [@FrothyMarrow](https://github.com/FrothyMarrow) - For seeing mistakes that I - [@FrothyMarrow](https://github.com/FrothyMarrow) - For seeing mistakes that I could not
could not
- [@Diniamo](https://github.com/Diniamo) - For actively submitting PRs, pull
requests and overall assistence
- [@Gerg-l](https://github.com/gerg-l) - For the modern Neovim wrapper, mnw and
occasional code improvements
and everyone who has submitted issues or pull requests! and everyone who has submitted issues or pull requests!
@ -203,18 +172,10 @@ and everyone who has submitted issues or pull requests!
This configuration borrows from and is based on a few other configurations, This configuration borrows from and is based on a few other configurations,
including: including:
- [@jordanisaacs's](https://github.com/jordanisaacs) - [@jordanisaacs's](https://github.com/jordanisaacs) [neovim-flake](https://github.com/jordanisaacs/neovim-flake) that this flake is originally based on.
[neovim-flake](https://github.com/jordanisaacs/neovim-flake) that this flake - [@sioodmy's](https://github.com/sioodmy) [dotfiles](https://github.com/sioodmy/dotfiles) that inspired the design choices.
is originally based on. - [@wiltaylor's](https://github.com/wiltaylor) [neovim-flake](https://github.com/wiltaylor/neovim-flake) for plugin and design ideas.
- [@sioodmy's](https://github.com/sioodmy) - [@gvolpe's](https://github.com/gvolpe) [neovim-flake](https://github.com/gvolpe/neovim-flake) for plugin, design and nix concepts.
[dotfiles](https://github.com/sioodmy/dotfiles) that inspired the design
choices.
- [@wiltaylor's](https://github.com/wiltaylor)
[neovim-flake](https://github.com/wiltaylor/neovim-flake) for plugin and
design ideas.
- [@gvolpe's](https://github.com/gvolpe)
[neovim-flake](https://github.com/gvolpe/neovim-flake) for plugin, design and
nix concepts.
I am grateful for their previous work and inspiration, and I wholeheartedly I am grateful for their previous work and inspiration, and I wholeheartedly
recommend checking their work out. recommend checking their work out.
@ -222,14 +183,11 @@ recommend checking their work out.
## License ## License
Following the license of the Following the license of the [original neovim-flake](https://github.com/jordanisaacs/neovim-flake),
[original neovim-flake](https://github.com/jordanisaacs/neovim-flake), **nvf** **nvf** has been made available under the [**MIT License**](LICENSE). However, all assets
has been made available under the [**MIT License**](LICENSE). However, all and documentation are published under the
assets and documentation are published under the
[**CC BY License**](https://github.com/NotAShelf/nvf/blob/main/.github/assets/LICENSE). [**CC BY License**](https://github.com/NotAShelf/nvf/blob/main/.github/assets/LICENSE).
<h6 align="center">Yes, this includes the logo work too. Stop taking artwork that is not yours!</h6>
--- ---
<div align="right"> <div align="right">

View file

@ -1,22 +0,0 @@
name: Cleanup
on:
workflow_dispatch:
schedule:
- cron: "0 4 1 * *" # 4AM on 1st of every month
- cron: "0 4 15 * *" # 4AM on the 15th of every month
jobs:
branches:
name: Cleanup old branches
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Delete old branches"
uses: beatlabs/delete-old-branches-action@v0.0.10
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
date: "1 months ago"
dry_run: false
delete_tags: false
exclude_open_pr_branches: true

View file

@ -19,7 +19,6 @@ isMaximal: {
lspsaga.enable = false; lspsaga.enable = false;
trouble.enable = true; trouble.enable = true;
lspSignature.enable = true; lspSignature.enable = true;
otter-nvim.enable = isMaximal;
lsplines.enable = isMaximal; lsplines.enable = isMaximal;
nvim-docs-view.enable = isMaximal; nvim-docs-view.enable = isMaximal;
}; };
@ -156,7 +155,7 @@ isMaximal: {
}; };
utility = { utility = {
ccc.enable = false; ccc.enable = isMaximal;
vim-wakatime.enable = false; vim-wakatime.enable = false;
icon-picker.enable = isMaximal; icon-picker.enable = isMaximal;
surround.enable = isMaximal; surround.enable = isMaximal;

View file

@ -202,5 +202,3 @@ everyone.
[Soliprem](https://github.com/Soliprem) [Soliprem](https://github.com/Soliprem)
- Add LSP and Treesitter support for R under `vim.languages.R`. - Add LSP and Treesitter support for R under `vim.languages.R`.
- Add Otter support under `vim.lsp.otter` and an assert to prevent conflict with
ccc

17
flake.lock generated
View file

@ -1373,22 +1373,6 @@
"type": "github" "type": "github"
} }
}, },
"plugin-otter-nvim": {
"flake": false,
"locked": {
"lastModified": 1724585935,
"narHash": "sha256-euHwoK2WHLF/hrjLY2P4yGrIbYyBN38FL3q4CKNZmLY=",
"owner": "jmbuhr",
"repo": "otter.nvim",
"rev": "ca9ce67d0399380b659923381b58d174344c9ee7",
"type": "github"
},
"original": {
"owner": "jmbuhr",
"repo": "otter.nvim",
"type": "github"
}
},
"plugin-oxocarbon": { "plugin-oxocarbon": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -1877,7 +1861,6 @@
"plugin-obsidian-nvim": "plugin-obsidian-nvim", "plugin-obsidian-nvim": "plugin-obsidian-nvim",
"plugin-onedark": "plugin-onedark", "plugin-onedark": "plugin-onedark",
"plugin-orgmode-nvim": "plugin-orgmode-nvim", "plugin-orgmode-nvim": "plugin-orgmode-nvim",
"plugin-otter-nvim": "plugin-otter-nvim",
"plugin-oxocarbon": "plugin-oxocarbon", "plugin-oxocarbon": "plugin-oxocarbon",
"plugin-plenary-nvim": "plugin-plenary-nvim", "plugin-plenary-nvim": "plugin-plenary-nvim",
"plugin-project-nvim": "plugin-project-nvim", "plugin-project-nvim": "plugin-project-nvim",

View file

@ -13,8 +13,8 @@
inherit inputs; inherit inputs;
specialArgs = {inherit lib;}; specialArgs = {inherit lib;};
} { } {
# Allow users to bring their own systems. # provide overridable systems
# «https://github.com/nix-systems/nix-systems» # https://github.com/nix-systems/nix-systems
systems = import inputs.systems; systems = import inputs.systems;
imports = [ imports = [
./flake/apps.nix ./flake/apps.nix
@ -62,6 +62,7 @@
pkgs, pkgs,
... ...
}: { }: {
formatter = pkgs.alejandra;
devShells = { devShells = {
default = self'.devShells.lsp; default = self'.devShells.lsp;
nvim-nix = pkgs.mkShell {packages = [config.packages.nix];}; nvim-nix = pkgs.mkShell {packages = [config.packages.nix];};
@ -69,21 +70,6 @@
packages = with pkgs; [nil statix deadnix alejandra]; packages = with pkgs; [nil statix deadnix alejandra];
}; };
}; };
# Provide the default formatter. `nix fmt` in project root
# will format available files with the correct formatter.
# P.S: Please do not format with nixfmt! It messes with many
# syntax elements and results in unreadable code.
formatter = pkgs.alejandra;
# Check if codebase is properly formatted.
# This can be initiated with `nix build .#checks.<system>.nix-fmt`
# or with `nix flake check`
checks = {
nix-fmt = pkgs.runCommand "nix-fmt-check" {nativeBuildInputs = [pkgs.alejandra];} ''
alejandra --check ${self} < /dev/null | tee $out
'';
};
}; };
}; };
@ -170,11 +156,6 @@
flake = false; flake = false;
}; };
plugin-otter-nvim = {
url = "github:jmbuhr/otter.nvim";
flake = false;
};
# Language support # Language support
plugin-sqls-nvim = { plugin-sqls-nvim = {
url = "github:nanotee/sqls.nvim"; url = "github:nanotee/sqls.nvim";

View file

@ -226,7 +226,7 @@ in {
{ {
assertion = cfg.lsp.enable -> cfg.lsp.server != "tsserver"; assertion = cfg.lsp.enable -> cfg.lsp.server != "tsserver";
message = '' message = ''
As of a recent lspconfig update, the `tsserver` configuration has been renamed As of a recent lspconfig update, he `tsserver` configuration has been renamed
to `ts_ls` to match upstream behaviour of `lspconfig`, and the name `tsserver` to `ts_ls` to match upstream behaviour of `lspconfig`, and the name `tsserver`
is no longer considered valid by nvf. Please set `vim.languages.ts.lsp.server` is no longer considered valid by nvf. Please set `vim.languages.ts.lsp.server`
to `"ts_ls"` instead of to `${cfg.lsp.server}` to `"ts_ls"` instead of to `${cfg.lsp.server}`

View file

@ -13,7 +13,6 @@
./trouble ./trouble
./lsp-signature ./lsp-signature
./lightbulb ./lightbulb
./otter
./lspkind ./lspkind
./lsplines ./lsplines
./nvim-docs-view ./nvim-docs-view

View file

@ -1,39 +0,0 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf mkMerge;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding;
cfg = config.vim.lsp;
self = import ./otter.nix {inherit lib;};
mappingDefinitions = self.options.vim.lsp.otter-nvim.mappings;
mappings = addDescriptionsToMappings cfg.otter-nvim.mappings mappingDefinitions;
in {
config = mkIf (cfg.enable && cfg.otter-nvim.enable) {
assertions = [
{
assertion = !config.vim.utility.ccc.enable;
message = ''
ccc and otter have a breaking conflict. It's been reported upstream. Until it's fixed, disable one of them
'';
}
];
vim = {
startPlugins = ["otter-nvim"];
maps.normal = mkMerge [
(mkSetBinding mappings.toggle "<cmd>lua require'otter'.activate()<CR>")
];
pluginRC.otter-nvim = entryAnywhere ''
-- Enable otter diagnostics viewer
require("otter").setup({${toLuaObject cfg.otter-nvim.setupOpts}})
'';
};
};
}

View file

@ -1,6 +0,0 @@
{
imports = [
./otter.nix
./config.nix
];
}

View file

@ -1,64 +0,0 @@
{lib, ...}: let
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.nvim.binds) mkMappingOption;
inherit (lib.types) bool str listOf;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.lsp = {
otter-nvim = {
enable = mkEnableOption ''
lsp features and a code completion source for code embedded in other documents [otter-nvim]
'';
mappings = {
toggle = mkMappingOption "Activate LSP on Cursor Position [otter-nvim]" "<leader>lo";
};
setupOpts = mkPluginSetupOption "otter.nvim" {
lsp = {
diagnostic_update_event = mkOption {
type = listOf str;
default = ["BufWritePost"];
description = ''
`:h events` that cause the diagnostic to update.
Set to: {"BufWritePost", "InsertLeave", "TextChanged" }
for less performant but more instant diagnostic updates
'';
};
};
buffers = {
set_filetype = mkOption {
type = bool;
default = false;
description = ''
if set to true, the filetype of the otterbuffers will be set. Other wide only
the autocommand of lspconfig that attaches the language server will be
executed without stting the filetype
'';
};
write_to_disk = mkOption {
type = bool;
default = false;
description = ''
write <path>.otter.<embedded language extension> files to disk on save of main buffer.
Useful for some linters that require actual files.
Otter files are deleted on quit or main buffer close
'';
};
};
strip_wrapping_quote_characters = mkOption {
type = listOf str;
default = ["'" ''"'' "`"];
description = ''
'';
};
handle_leading_whitespace = mkOption {
type = bool;
default = false;
description = ''
otter may not work the way you expect when entire code blocks are indented
(eg. in Org files) When true, otter handles these cases fully.
'';
};
};
};
};
}