Compare commits

..

No commits in common. "95397837b3586786306b22b58e651c59b457475b" and "646e4bb1a4e7a605ec6a84c10ea957cd15002fcb" have entirely different histories.

10 changed files with 6 additions and 170 deletions

17
.github/README.md vendored
View file

@ -43,7 +43,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,7 +50,6 @@
[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]**
@ -62,19 +60,6 @@
--- ---
## 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.
## Get Started ## Get Started
If you are not sold on the concepts of **nvf**, and would like to try out the If you are not sold on the concepts of **nvf**, and would like to try out the
@ -121,7 +106,7 @@ The _recommended_ way of installing **nvf** is using either the NixOS or the
Home-Manager module, though it is completely possible and no less supported to Home-Manager module, though it is completely possible and no less supported to
install **nvf** as a standalone package, or a flake output. install **nvf** as a standalone package, or a flake output.
See the [**nvf** manual] for detailed and up-to-date installation guides, See the [**nvf** Manual] for detailed and up-to-date installation guides,
configurations, available options, release notes and more. Tips for installing configurations, available options, release notes and more. Tips for installing
userspace plugins is also contained in the documentation. userspace plugins is also contained in the documentation.

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.
'';
};
};
};
};
}