Giter VIP home page Giter VIP logo

neovim-flake's Introduction

neovim-flake Logo

❄️ neovim-flake

A highly modular, configurable, extensible and easy to use Neovim configuration wrapper written in Nix. Designed for flexibility and ease of use and with code quality in mind.


Warning

Main branch is only updated for small, non-breaking changes. For the latest version of neovim-flake, please see the list of branches or open pull requests. neovim-flake, at the time, is still being actively developed - and will continue to be so for the foreseeable future.



Get Started

Using nix CLI

If you would like to try out the configuration before even thinking about installing it, you can run the following command

nix run github:notashelf/neovim-flake

This will get you a feel for the base configuration and UI design. The flake exposes #nix as the default package, providing minimal language support and various utilities.You may also use #nix, #tidal or #maximal to get try out different configurations.

It is as simple as changing the target output to get a different configuration. For example, to get a configuration with tidal support, run:

nix run github:notashelf/neovim-flake#tidal

Similar instructions will apply for nix profile install. However, you are recommended to instead use the module system as described in the manual.

Note

The maximal configuration is massive and will take a while to build. To get a feel for the configuration, use the default nix or tidal configurations. Should you choose to try out the maximal configuration, using the binary cache as described in the manual is strongly recommended.

Docker

As of version 0.5, an image for the nix output is published to Dockerhub and GitHub packages with each tagged release. If you do not have Docker installed on your system, you may run neovim within a container using your favorite tool. You are still recommended to use nix instead of Docker.

The following command will open the current directory in neovim with necessary tools bootstrapped.

docker run -v `pwd`:/home/neovim/demo --rm -it notashelf/neovim-flake:latest

The available registeres are ghcr.io and dockerhub for the time being. Adjust to your liking.

Documentation

See the neovim-flake Manual for detailed installation guides, configurations, available options, release notes and more.

If you want to dive right into trying neovim-flake you can get a fully featured configuration with nix language support by running:

nix run github:notashelf/neovim-flake

Please create an issue on the issue tracker if you find the documentation lacking or confusing. I also appreciate any contributions to the documentation.

Help

You can create an issue on the issue tracker to ask questions or report bugs. I am not yet on spaces like matrix or IRC, so please use the issue tracker for now.

Contributing

I am always looking for new ways to help improve this flake. If you would like to contribute, please read the contributing guide before submitting a pull request. You can also create an issue on the issue tracker before submitting a pull request if you would like to discuss a feature or bug fix.

Philosophy

The philosophy behind this flake configuration is to create an easily configurable and reproducible Neovim environment. While it does sacrifice in size (which I know some users will find disagreeable), it offers a lot of flexibility and customizability in exchange for the large size of the flake inputs. The "KISS" (Keep it simple, stupid) principle has mostly been abandoned here, however, you can ultimately leverage the flexibility of this flake to declare a configuration that follows KISS principles, as it is very easy to bring your own plugins and configurations from non-nix. What this flake is meant to be does eventually fall into your hands. Whether you are a developer, writer, or live coder, you can quickly craft a config that suits every project's need. Think of it like a distribution of Neovim that you have full control over. A distribution that takes advantage of pinning vim plugins and third party dependencies (such as tree-sitter grammars, language servers, and more).

One should never get a broken config when setting options. If setting multiple options results in a broken Neovim, file an issue! Each plugin knows when another plugin which allows for smart configuration of keybindings and automatic setup of things like completion sources and languages.

FAQ

Q: Why is this flake so big?
A: I have sacrificed in size in order to provide a highly configurable and reproducible Neovim environment. A binary cache is provided to eleminate the need to build the flake from source, but it is still a large flake. If you do not need all the features, you can use the default nix output instead of the maximal output. This will reduce size by a lot, but you will lose some language specific features.

Q: Will you try to make this flake smaller?
A: Yes. As a matter of fact, I am actively working on making this flake smaller. Unfortunately the process of providing everything possible by itself makes the flake large. Best I can do is to optimize the flake as much as possible by selecting plugins that are small and fast. And the binary cache, so at least you don't have to build it from source.

Q: Will you use a plugin manager/language server installer?
A: No. If you feel the need to ask that question, then you have missed the whole point of using nix and ultimately this flake. The whole reason we use nix is to be able to handle EVERYTHING declaratively, well including the LSP and plugin installations.

Q: Can you add X?
A: Maybe. Open an issue using the appropriate template and I will consider it. I do not intend to add every plugin that is in existence, but I will consider it, should it offer something useful to the flake.

Credits

Contributors

Special thanks to

  • @fufexan - For the transition to flake-parts
  • @FlafyDev - For getting the home-manager to work
  • @n3oney - For making custom keybinds finally possible
  • @horriblename - For actively implementing planned features and quality of life updates
  • @Yavko - For the amazing neovim-flake logo
  • @FrothyMarrow - For seeing mistakes that I could not

and everyone who has submitted issues or pull requests!

Inspiration

This configuration borrows from and is based on a few other configurations, including:

I am grateful for their previous work and inspiration, and I wholeheartedly recommend checking their work out.


neovim-flake's People

Contributors

amanse avatar dependabot[bot] avatar donnerinoern avatar elijahimmer avatar flafydev avatar frothymarrow avatar fufexan avatar horriblename avatar isabelroses avatar jsw08 avatar ksonj avatar n3oney avatar notashelf avatar vagahbond avatar yavko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

neovim-flake's Issues

`sudo nixos-rebuild edit` doesn't use default editor

⚠️ Please verify that this bug has NOT been reported before.

  • I checked all existing issues and didn't find a similar issue

Description

When I run sudo nixos-rebuild edit, it always opens in nano, even though neovim is the default editor. Running nix-os-rebuild edit, without sudo, opens in neovim as it should, but without sudo I can't actually save the file.

In configuration.nix, I have programs.neovim.defaultEditor = true;. That is the global setting, it is not specific to my user. If I run sudo echo $EDITOR, I get back nvim, so I'm not sure why it's confused...

👟 Reproduction steps

  1. Add programs.neovim.enabled = true; and programs.neovim.defaultEditor = true; to configuration.nix.
  2. Run sudo nixos-rebuild switch.
  3. Reboot the machine.
  4. In a prompt, type sudo nixos-rebuild edit.
  5. BUG: the file is opened in nano, instead of neovim.

👀 Expected behavior

sudo nixos-rebuild edit should open configuration.nix in neovim.

😓 Actual Behavior

sudo nixos-rebuild edit opens configuration.nix in nano, regardless of my configuration.

💻 Metadata

this path will be fetched (0.01 MiB download, 0.04 MiB unpacked): /nix/store/0jmdsgfnd6aakxdr0sl5l7zzfs59hdrw-stdenv-linux copying path '/nix/store/0jmdsgfnd6aakxdr0sl5l7zzfs59hdrw-stdenv-linux' from 'https://cache.nixos.org'... - system: "x86_64-linux" - host os: Linux 5.15.110, NixOS, 22.11 (Raccoon), 22.11.4203.d41eea2839d - multi-user?: yes - sandbox: yes - version: nix-env (Nix) 2.11.1 - channels(root): "home-manager-22.11.tar.gz, nixos-22.11" - channels(adam): "home-manager-22.11.tar.gz" - nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

📝 Relevant log output

N/A

rework language module, again

Potential ideas that need to be discussed:

  1. a custom cmd attribute that takes either the path of a package ({lib.getExe pkgs.<packageName>} or a string, allowing the user to bring their own LSPs (#44)
  2. do not assume LSP name and path - related to 1
  3. seperate config and options again

breaking: nvim-tree module has been reworked

Heads up! The #107 PR will be introducing a major breaking change for all nvim-tree users.

The configuration has changed drastically since the module has been introduced, and as such I had to rewrite the modulee from scratch to avoid further technical debt (mostly to myself).

The new structure is cleaner, better documented and, for the most part, future-proof regarding nvimtree API.
Unfortunately there was too many changes for me to use point old options at the new ones, so I will recommend starting from scratch.

Once the PR has been merged, expect breaking changes. You will need to re-write the nvimtree section of your configuration.

Error after adding neovim-flake to my inputs.

⚠️ Please verify that this bug has NOT been reported before.

  • I checked all existing issues and didn't find a similar issue

Description

Adding neovim-flake into my configuration caused this error.

error:
       … while evaluating a branch condition

         at /nix/store/233086pcwz4qx09l1xgdlzn2yh1p04zy-source/flake.nix:38:15:

           37|             (name: value:
           38|               if isAttrs value then lhs.${name} or { } // value
             |               ^
           39|               else if isList value then lhs.${name} or [ ] ++ value

       … while calling the 'isAttrs' builtin

         at /nix/store/233086pcwz4qx09l1xgdlzn2yh1p04zy-source/flake.nix:38:18:

           37|             (name: value:
           38|               if isAttrs value then lhs.${name} or { } // value
             |                  ^
           39|               else if isList value then lhs.${name} or [ ] ++ value

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: getting status of '/nix/store/mdi3hh7gwk41hgkbhliyhc1ira77b2gi-source/default.nix': No such file or directory

NOTE I have only added the Neovim-flake URL and the nixpkgs.follows attribute to my inputs, and I haven't done anything more than that.

👟 Reproduction steps

  1. Add neovim-flake url and the nixpkgs.follows attribute in the inputs.
  2. run sudo nixos-rebuild switch --flake .#

👀 Expected behavior

It should build my configuration because the only thing I did was add the neovim-flake to my inputs.

😓 Actual Behavior

It throws an error.

💻 Metadata

  • system: "x86_64-linux" - host os: Linux 6.2.11-xanmod1, NixOS, 23.05 (Stoat), 23.05.20230418.555daa9 - multi-user?: yes - sandbox: yes - version: nix-env (Nix) 2.15.0 - nixpkgs: /nix/store/qj565ha0ix6l30118j5i3j6vmhnb1n3y-source

📝 Relevant log output

Check the description.

Make lsp server installation optional

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

API Additions

🔖 Feature description

As previously discussed on discord:

  • Lsp servers shouldn't be installed when enabling lsp for a language like vim.lsp.rust.enable = true;.
  • I myself use flake devshells on per project basis to get lsp servers and having them installed by neovim even when I don't need them will waste space.
  • Another common scenario for this will be, A user uses 2 editors say emacs and neovim and they want the lsp server to be available to both. This flake will install the server and it will be exclusively available to only neovim. Which would result the user to install another copy of the same server system wide so it's available to emacs.

✔️ Solution

I believe one possible solution is:

  • provide a config option for every language the flake supports.
  • The option can be something like vim.lsp.rust.lspServerPackage
  • This option could have 2 values either a string or a package.
  • That way users can use the same package for both neovim and emacs(as under the hood nix will just symlink the package to make it available to both)
  • The string option will be helpful for my usecase. That is I can just set it to "rust-analyzer" so in lsp config it'll be cmd = {"rust-analyzer"}, Instead of cmd = {"${pkgs.rust-analyzer}/bin/rust-analyzer"}, (link to what I'm talking about)
  • So when I'm in my devshell it'll just search for rust-analyzer in the path which should be available to it.

The same can be done for formatters as well.

❓ Alternatives

No response

📝 Additional Context

The default value for this option can be left same to what is used now. So for rust it'll be pkgs.rust-analyzer. So nothing breaks for people who are using this already

tokyonight and onedark is broken

⚠️ Please verify that this bug has NOT been reported before.

  • I checked all existing issues and didn't find a similar issue

Description

got this when I updated to c874b7f

error: function 'setup' called with unexpected argument 'transparent'

(see log)

👟 Reproduction steps

  1. set vim.theme.name to tokyonight/onedark
  2. rebuild

👀 Expected behavior

build

😓 Actual Behavior

error: function 'setup' called with unexpected argument 'transparent'

💻 Metadata

  • system: "x86_64-linux" - host os: Linux 6.2.10-zen1-1-zen, Arch Linux, noversion, rolling - multi-user?: yes - sandbox: yes - version: nix-env (Nix) 2.14.1 - channels(py): "home-manager, nixpkgs" - nixpkgs: /home/py/.nix-defexpr/channels/nixpkgs

📝 Relevant log output

error: function 'setup' called with unexpected argument 'transparent'

       at /nix/store/cgjgxhm91lpd9zgc7q76kh2xw3993qcw-source/modules/theme/supported_themes.nix:14:13:

           13|   tokyonight = {
           14|     setup = {style ? "night"}: ''
             |             ^
           15|       vim.cmd[[colorscheme tokyonight-${style}]]

null-ls cannot be used with ccls due to `offset_encoding`

I've recently come to realize that we cannot use null-ls with ccls (which is the default lang server for C/C++ rn) due offset_encoding differences.

Thanks to this PR (#61) we are able to use clangd as the the language server, which will throw constant warnings for most of my C/C++ files.

warning: multiple different client offset_encodings detected for buffer, this is not supported yet

I've quickly attempted the suggested "fix" from here for null-ls, but doesn't seem to affect anything.

We should consider the following:

  1. disable null-ls for ccls (@n3oney this might be more for you)
  2. configure offset encodings for clangd to supress the multiple different client offset_encodings detected warning (@horriblename maybe you might know anything about this)

Relevant:

border support for lsp windows

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

API Additions

🔖 Feature description

Add border to lsp windows as they are useful with transparent color schemes to distinguish content between the floating window and the main window.

✔️ Solution

Include border configuration for both :LspInfo and lsp functions.

❓ Alternatives

Alternative may be to add an option to make them opaque for such color schemes.

📝 Additional Context

This is how :LspInfo and hover() look with transparent color schemes -

extraConfig to pass into builtin plugin's `setup()`

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

API Additions

🔖 Feature description

I'd like to add custom options that should be passed into the setup function of builtin plugins,

✔️ Solution

I have an idea using a nix to lua transpiler.

Example:

# user's configuration
vim.filetree.nvimTree = {
   enable = true;
   openOnSetup = false;
   # this attrset will be transpiled into lua:
   extraConfig = {
      select_prompts = false;
      view = { width = 30; };
      renderer.special_files = ["Cargo.toml" "Makefile"];
      on_attach = { _type = "_rawLua", code = ''
         function(bufnr)
            vim.keymap.set("n", "x", ":DoSomething<CR>", {buffer=bufnr})
         end
      ''};
   };
};

should generate this lua code (except uglier):

require("nvim-tree").setup({
   open_on_setup = true,
   select_prompts = false,
   view = { width = 30 },
   renderer = {special_files = {"Cargo.toml", "Makefile"}},
   on_attach = function(bufnr)
      vim.keymap.set("n", "x", ":DoSomething<CR>", {buffer=bufnr})
   end
})

We'll have to rewrite existing options in terms of extraConfig instead:

options.vim.filetree.nvimTree = {
      enable = mkEnableOption "...";
      openOnSetup = mkOption { ... };
      extraConfig = mkOption {
         type = types.anything;
      };
};

# cfg = config.vim.filetree.nvimTree
config.extraConfig = {
   open_on_setup = cfg.open_on_setup
}

config.vim.luaConfigRC.nvimtreelua = nvim.dag.entryAnywhere ''
   require 'nvim-tree'.setup(${convertToLua cfg.extraConfig})
''

The transpiler

with some minor improvements we can use lib.nvim.lua.expToLua

The transpiler should convert a nix value into a lua value, the only restriction is lambdas aren't allowed.

I have a working implementation here

Example usage here

❓ Alternatives

No response

📝 Additional Context

No response

Toggleterm inserts some weird characters when accidentally pressing backspace, space, or return with shift.

⚠️ Please verify that this bug has NOT been reported before.

  • I checked all existing issues and didn't find a similar issue

Description

A possible fix is to just remap these 3 characters in terminal mode, with the new keybinds PR the way to do that would be:

{
  maps.terminal = {
    "<S-BS>" = {action = "<BS>";};
    "<S-Space>" = {action = "<Space>";};
    "<S-CR>" = {action = "<CR>";};
  };
}

👟 Reproduction steps

  1. open toggleterm (preferrably lazygit integration's commit message input, as more bugs happen there)
  2. hold down shift
  3. click backspace, space, or return

👀 Expected behavior

You'd just get a backspace, space, or return

😓 Actual Behavior

You get:

  • 127;2u for backspace
  • 32;2u for space
  • 13;2u for return

💻 Metadata

  • system: "x86_64-linux" - host os: Linux 6.1.26, NixOS, 23.05 (Stoat), 23.05.20230502.1a411f2 - multi-user?: yes - sandbox: yes - version: nix-env (Nix) 2.13.3 - channels(neoney): "nixos" - channels(root): "nixos" - nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

📝 Relevant log output

no

multiple `vim.loader.enable()` calls in generated init.vim

⚠️ Please verify that this bug has NOT been reported before.

  • I checked all existing issues and didn't find a similar issue

Description

using the vim.enableLuaLoader option results in duplicate calls to vim.loader.enable() due to my stupidity. This is harmless, but I should still clean it up.

I'll fix it soon ™️

👟 Reproduction steps

enable the vim.enableLuaLoader option

👀 Expected behavior

vim.loader.enable() only appears once in the generated init file

😓 Actual Behavior

multiple calls to vim.loader.enable()

💻 Metadata

  • system: "x86_64-linux" - host os: Linux 6.2.10-zen1-1-zen, Arch Linux, noversion, rolling - multi-user?: yes - sandbox: yes - version: nix-env (Nix) 2.14.1 - channels(py): "home-manager, nixpkgs" - nixpkgs: /home/py/.nix-defexpr/channels/nixpkgs

📝 Relevant log output

-

Plugin request: flutter-tools.nvim

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

New Addon

🔖 Feature description

Currently flutter projects are considered like any other dart project by the LSP. Which could be a very unfulfilling experience, especially if you come from vscode.

flutter-tools.nvim enhances the experience of working with Flutter projects in Neovim by adding these features: (Images of these features are available on the plugin's README)

  • Run flutter app with hot reloading
  • Start emulators or connected devices
  • Visualise colours from LSP
  • Visualise logs
  • Widget guides
  • Outline window
  • Closing Tags
  • Statusline decorations
  • Good experience with debugging

✔️ Solution

To add flutter-tool.nvim as a official plugin of the flake.

In my opinion, this plugin should be enabled by default, since it doesn't affect working with Dart or any other type of project besides Flutter. And you'll basically always want it when using working on Flutter projects.

❓ Alternatives

No response

📝 Additional Context

Warnings to consider(especially the first one): https://github.com/akinsho/flutter-tools.nvim#warning

My config:

require('flutter-tools').setup {
  lsp = {
    color = { -- show the derived colours for dart variables
      enabled = true, -- whether or not to highlight color variables at all, only supported on flutter >= 2.10
      background = false, -- highlight the background
      foreground = false, -- highlight the foreground
      virtual_text = true, -- show the highlight using virtual text
      virtual_text_str = "", -- the virtual text character to highlight
    },
    on_attach = on_attach,
    flags = lsp_flags,
    capabilities = capabilities,
  },
}

Displaying colors never worked for me. Maybe you'll have better luck with it.

The ability to load custom plugins before they're officially added

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

API Additions, Other

🔖 Feature description

I'd like to be able to load any available plugins before they're officially added to the flake, because sometimes shit happens and stuff can't get updated.

✔️ Solution

I'd think about some option like extraPlugins, that could look something like that:

{
extraPlugins = {
  "someauthor/someplugin.nvim" = {
    config = ''
      -- lua function that will load the plugin
      require("someplugin").setup()
    '';
    # To possibly pin the plugin to some commit
    gitHash = "abcdefhg";
  };
};
}

❓ Alternatives

No response

📝 Additional Context

No response

Elixir support

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

New Addon

🔖 Feature description

Would love to have elixir support...

I obviously am a dev, new to neovim and nix, but eager to learn...

So I can get some basic assistance, I will make this happen, so that project suddenly becomes useful for my day-to-day job.

✔️ Solution

Elixir to have syntax highlighting, and LSP support

❓ Alternatives

No response

📝 Additional Context

No response

Navbuddy requires nui.nvim

⚠️ Please verify that this bug has NOT been reported before.

  • I checked all existing issues and didn't find a similar issue

Description

nvim-navbuddy has nui.nvim as a requirement, as stated in their readme.

https://github.com/SmiteshP/nvim-navbuddy/blob/15184582a786d6b32b2724a4799891d0d69f0cdd/README.md?plain=1#L8-L13

However the ui/breadcrumbs/config.nix does not declare nui.nvim in it's startplugins

https://github.com/NotAShelf/neovim-flake/blob/35ea9e5da3601745d649c291b1592f2586ce5596/modules/ui/breadcrumbs/config.nix#L17-L28

This bug is probably usually hidden, because other modules like noice.nvim are enabled, which in turn provide nui.nvim in their startplugins.

https://github.com/NotAShelf/neovim-flake/blob/7a81889afe634fd7314f682e6b59a9f8210caaea/modules/ui/noice/config.nix#L11-L14

👟 Reproduction steps

Set vim.ui.breadcrumbs.enable = true and vim.ui.noice.enable = false

👀 Expected behavior

Runs just well, with breadcrumbs and navbuddy enabled, but noice disabled.

😓 Actual Behavior

Builds find, but when upon starting vim there is an error

E5108: Error executing lua ...mPackages/start/nvim-navbuddy/lua/nvim-navbuddy/init.lua:3: module 'nui.menu' not found:

💻 Metadata

  • system: "x86_64-linux" - host os: Linux 6.1.44, NixOS, 23.05 (Stoat), 23.05.20230809.9034b46 - multi-user?: yes - sandbox: yes - version: nix-env (Nix) 2.13.5 - channels(root): "home-manager-22.11.tar.gz, nixos-23.05" - nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

📝 Relevant log output

Error detected while processing /nix/store/ry4hfpil8qqg583kzwllnb8lia14r2z5-init.vim:
line 1769:
E5108: Error executing lua ...mPackages/start/nvim-navbuddy/lua/nvim-navbuddy/init.lua:3: module 'nui.menu' not found:
        no field package.preload['nui.menu']
        no file '/nix/store/dg97kfv0q7xq91psvshdl4xk3b99iwwl-luajit-2.1.0-2022-10-04-env/share/lua/5.1/nui/menu.lua'
        no file '/nix/store/dg97kfv0q7xq91psvshdl4xk3b99iwwl-luajit-2.1.0-2022-10-04-env/share/lua/5.1/nui/menu/init.lua'
        no file '/nix/store/dg97kfv0q7xq91psvshdl4xk3b99iwwl-luajit-2.1.0-2022-10-04-env/lib/lua/5.1/nui/menu.so'
        no file '/nix/store/dg97kfv0q7xq91psvshdl4xk3b99iwwl-luajit-2.1.0-2022-10-04-env/lib/lua/5.1/nui.so'
stack traceback:
        [C]: in function 'require'
        ...mPackages/start/nvim-navbuddy/lua/nvim-navbuddy/init.lua:3: in main chunk
        [C]: in function 'require'
        [string ":lua"]:289: in main chunk
line 2128:
E5108: Error executing lua [string ":lua"]:94: attempt to index field 'gitsigns' (a nil value)
stack traceback:
        [string ":lua"]:94: in main chunk
Press ENTER or type command to continue

Debugger support

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

New Addon

🔖 Feature description

It'd be nice to have debugger support for all languages. Note that rust-tools has some commands for debugging, but won't work without nvim-dap.

✔️ Solution

https://github.com/mfussenegger/nvim-dap is needed, plus debugger for each language needs to be installed

❓ Alternatives

No response

📝 Additional Context

No response

Prisma language support

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

New Addon

🔖 Feature description

Prisma is a very popular
image
TypeScript ORM
It uses a custom format for its schema files, and they are currently shown with zero formatting or anything of that kind.

✔️ Solution

I'd like to request https://github.com/prisma/vim-prisma be added.

❓ Alternatives

No response

📝 Additional Context

No response

add titles to which-key registeries

which-key requires that registery names are manually set so that it displays specified name instead of +prefix

wk.register({
  f = {
    name = "file", -- without this, which-key only displays "prefix" for keys
  },
}, { prefix = "<leader>" })

example undesired setup:
image

Improve spell check stuffs

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

API Additions

🔖 Feature description

add better spellcheck

✔️ Solution

make spellcheck language config be a list, and add dirtytalk word list and enable as default cuz i'd hate for my amazing programmer terms to be underlined

❓ Alternatives

nothing

📝 Additional Context

https://github.com/psliwka/vim-dirtytalk/tree/master

Migrate to nix2vim?

Discussed in #9

Originally posted by gytis-ivaskevicius February 10, 2023

Hi, I came around to your project and I gotta say - I love the amount of work you have put into this project, will definitely steal a few things :)
One of the things I'd like to see is migration to https://github.com/gytis-ivaskevicius/nix2vim/, It is a non-opinionated neovim wrapper that defines a simple API to define lua options. I think it would be great if this project was a higher degree of abstraction over nix2vim

fix home-manager module

Currently the main method of implementing neovim-flake is through integrating it with your flake or adding it to your configuration.nix. The desired method, however, would be to implement home-manager properly so that neovim-flake is a distro agonistic neovim configuration as it is envisoned to be.

Currently, the main issue lies at home-manager's useGlobalPkgs option.

The current problem is that we cannot access the packages.maximal attribute provided by the flake. Flakeparts does it differently, I guess?

Nix-Color intergration

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

New Addon

🔖 Feature description

You should add nix-colors intergration, it shouldn't be too hard since it has a function to generate a vim theme.

✔️ Solution

Either add a custom intergration for nix-colors or add support for plugins, since you can install the nix colors vim theme via plugins.

❓ Alternatives

No response

📝 Additional Context

No response

Neovim 0.9

Neovim 0.9 is now in nixpkgs unstable, which we do build against.

Overall, most of our plugins have worked on 0.9 almost perfectly, but since treesiter has been changed on 0.9, nvim-cmp is broken upstream. There is a PR that I am currently tracking.

We will update as soon as upstream fixes are merged, and new neovim options are implemented in the core module.

If you, dear reader, would like to contribute those changes before I can; please see the feature/neovim0.9 branch. Thanks!

sqls is deprecated, use sqlls instead

⚠️ Please verify that this bug has NOT been reported before.

  • I checked all existing issues and didn't find a similar issue

Description

Hi its me again :P

It seems like the sql language server sqls is public archive.
nvim-lspconfig have decided to deprecate it and will remove it in version 0.2.0 (See here)

They suggest replacing it with sqlls, which is already available in nvim-lspconfig (See here)
It can be downloaded on npm, however there is no dedicated nixos package yet, so that would have to be done in a derivation using node2nix or similar means... which probably bloats this flake quite a bit.

I don't know what the best way to proceed here is, but i thought it probably should be an issue, just for completeness sake...

👟 Reproduction steps

{
  inputs = {
    nixpkgs.url = "nixpkgs/nixos-23.05";
    neovim-flake = {
      url = "github:notashelf/neovim-flake";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = {
    nixpkgs,
    neovim-flake,
    ...
  }: let
    configModule = {
      config = {
        vim.languages = {
          enableLSP = true;
          sql.enable = true;
        };
      };
    };
    pkgs = import nixpkgs {
      system = "x86_64-linux";
    };
    customNeovim = neovim-flake.lib.neovimConfiguration {
      modules = [configModule];
      inherit pkgs;
    };
  in {
    packages.x86_64-linux.default = customNeovim.neovim;
  };
}

👀 Expected behavior

Starts up fine

😓 Actual Behavior

When starting vim, you are prompted with a deprecation warning before you enter the editor.

💻 Metadata

  • system: "x86_64-linux" - host os: Linux 6.1.44, NixOS, 23.05 (Stoat), 23.05.20230809.9034b46 - multi-user?: yes - sandbox: yes - version: nix-env (Nix) 2.13.5 - channels(root): "home-manager-22.11.tar.gz, nixos-23.05" - nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

📝 Relevant log output

sqls is deprecated, use sqlls instead.
This feature will be removed in lspconfig version 0.2.0
Press ENTER or type command to continue

Svelte LSP

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

New Addon

🔖 Feature description

The title describes the feature.

✔️ Solution

I have no experience with adding lsp support for something, but I think that this might help.
Svelte's lsp github page

❓ Alternatives

No response

📝 Additional Context

No response

add `mind.nvim` to note-taking plugins

Currently the note-taking plugins are to comply with existing conventions (obsidian's own format and emacs' orgmode formatting). I'd like to provide a plugin that is rather personal, and should be most effective at taking in-dev notes.

mind.nvim seems like a suitable addition.

Auto format messing up file

⚠️ Please verify that this bug has NOT been reported before.

  • I checked all existing issues and didn't find a similar issue

Description

Sometimes the formatting messes up and deletes part of the file, usually when there is an error (syntax error etc. in the code detected by lsp), this happens with clangd sometimes, and throws this error:

Error executing vim.schedule lua callback: ...-unwrapped-0.9.0/share/nvim/runtime/lua/vim/lsp/util.lua:501: Invalid 'start_col': out of range
stack traceback:
	[C]: in function 'nvim_buf_set_text'
	...-unwrapped-0.9.0/share/nvim/runtime/lua/vim/lsp/util.lua:501: in function 'apply_text_edits'
	...rapped-0.9.0/share/nvim/runtime/lua/vim/lsp/handlers.lua:318: in function 'handler'
	...eovim-unwrapped-0.9.0/share/nvim/runtime/lua/vim/lsp.lua:1394: in function ''
	vim/_editor.lua: in function <vim/_editor.lua:0>

Possible Solution

I looked at the source and this is how you're doing the formatting:

            if vim.g.formatsave then
              if client.supports_method("textDocument/formatting") then
                local params = require'vim.lsp.util'.make_formatting_params({})
                client.request('textDocument/formatting', params, nil, bufnr)

              end
            end

I have frankly never seen this, I'm guessing it's really old code? Neovim provides vim.lsp.buf.format() which doesn't cause the same problem, so I think it's better to switch to that

👟 Reproduction steps

not sure if this is easily reproduced:

  1. use clangd
  2. write a c++ file with some kind of obvious syntax error (e.g. missing ;)
  3. save

👀 Expected behavior

format normally.

Running :lua vim.lsp.buf.format() to format it manually first fixes the issue

😓 Actual Behavior

neovim throws an error and the formatting is messed up, possibly deleting parts of the code.

💻 Metadata

  • system: "x86_64-linux" - host os: Linux 6.2.10-zen1-1-zen, Arch Linux, noversion, rolling - multi-user?: yes - sandbox: yes - version: nix-env (Nix) 2.14.1 - channels(py): "home-manager, nixpkgs" - nixpkgs: /home/py/.nix-defexpr/channels/nixpkgs

📝 Relevant log output

Error executing vim.schedule lua callback: ...-unwrapped-0.9.0/share/nvim/runtime/lua/vim/lsp/util.lua:501: Invalid 'start_col': out of range
stack traceback:
	[C]: in function 'nvim_buf_set_text'
	...-unwrapped-0.9.0/share/nvim/runtime/lua/vim/lsp/util.lua:501: in function 'apply_text_edits'
	...rapped-0.9.0/share/nvim/runtime/lua/vim/lsp/handlers.lua:318: in function 'handler'
	...eovim-unwrapped-0.9.0/share/nvim/runtime/lua/vim/lsp.lua:1394: in function ''
	vim/_editor.lua: in function <vim/_editor.lua:0>

add heirline.nvim

As an alternative to lualine, heirline could be considered. It is quite powerful and even supports click events.

un-deprecate darwin

In #22 I have deprecated darwin builds due to zig having been marked "broken" for them. As zig is a part of the maximal config, it should remain deprecated for now.

A fix could be to not enable zig, even if it's enabled in the config, on darwin systems.

Enabling `vim.notes.orgmode` throws an error

⚠️ Please verify that this bug has NOT been reported before.

  • I checked all existing issues and didn't find a similar issue

Description

Read the title 😂

👟 Reproduction steps

  1. Enable vim.notes.orgmode.
  2. Open neovim.
  3. It will throws an error.

👀 Expected behavior

It should be working without any errors.

😓 Actual Behavior

It throws an error, as shown in the screenshots.
image

💻 Metadata

  • system: "x86_64-linux" - host os: Linux 6.4.7-xanmod1, NixOS, 23.11 (Tapir), 23.11.20230804.3e36ea6 - multi-user?: yes - sandbox: yes - version: nix-env (Nix Super) 2.17.0pre20230710_6ff67e4 - nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

📝 Relevant log output

Error detected while processing /nix/store/hliw33qvyrs7998gvpzgka4am2bziah4-init.vim:
line  870:
Could not create parser dir ' /nix/store/7xfmxdyrr3hm2i46zs68wdagbjx0a2cp-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter/parser ':  Vim:E739: Cannot create directory /nix/store/7xfmxd
yrr3hm2i46zs68wdagbjx0a2cp-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter/parser: read-only file system
Press ENTER or type command to continue

user-friendlier API for adding custom plugins

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

API Additions

🔖 Feature description

as I understand, right now to add a custom plugin one would need to do something like this:

vim.startPlugins = [pkgs.pluginA];
vim.luaConfigRC.pluginA = lib.nvim.dag.entryAnywhere ''
  require('pluginA').setup {}
'';

this is kinda annoying to use, so I'd like to propose a simpler APi for this

✔️ Solution

We could add a new option, extraPlugins to help organizing custom plugins, which could look something like this:

extraPlugins = {
  pluginA = {
    package = pkgs.pluginA;
    setup = "require'pluginA'.setup {}"
  };
  pluginB = {
    package = pkgs.pluginB;
    dependencies = ["pluginA"];
  };
};

The main objective is to abstract away dag and use "dependencies" instead. It should work the same as dag.entryAfter ["pluginA"] ....

❓ Alternatives

everything I suggested is already doable, just a lot less intuitive. users shouldn't have to know what a dag is to add plugins

📝 Additional Context

No response

prettierd

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

New Addon

🔖 Feature description

Prettier on its own is slow.
prettierd is the solution.

✔️ Solution

add prettierd as preferrably the default TS formatter

❓ Alternatives

No response

📝 Additional Context

Unfortunately, prettierd is not packaged for Nix.
Packaging it shouldn't be that difficult though, hopefully.

full module system rework

The current state of the module structure is really messy for certain modules. With a major refactor, we should separate configuration options and the module that provides said options.

Furthermore, the module system should be documented properly to help guide potential new contributors.

fix documentation

the docs broke after adding more description to the modules - probably made a typo or smth somewhere

vim-wakatime is on a strike

⚠️ Please verify that this bug has NOT been reported before.

  • I checked all existing issues and didn't find a similar issue

Description

First setup of vim-wakatime gave me an error while doing nixos-rebuild build command, the reason is pretty easy to understand and the fix should be easy-ish.

It just looks like it prompts you for your api key if you don't have it already in your $HOME path, and it faisl then because no answer is magically given to it.

👟 Reproduction steps

Add the wakatime branch to your flake inputs.

Add this bit of code in your configuration somewhere :

# {... rest of the config...}
        vim.utility.vim-wakatime = {
          enable = true;
        };
# {...rest of the config...}

👀 Expected behavior

nixos-rebuild worky

😓 Actual Behavior

nixos-rebuild no worky

💻 Metadata

~ ❯ nix-shell -p nix-info --run "nix-info -m" this path will be fetched (0.00 MiB download, 0.00 MiB unpacked): /nix/store/8pfc9wfmn73bfz4ha0wmxvggk2wy9mpk-nix-info copying path '/nix/store/8pfc9wfmn73bfz4ha0wmxvggk2wy9mpk-nix-info' from 'https://cache.nixos.org'... - system: "x86_64-linux" - host os: Linux 6.1.21, NixOS, 23.05 (Stoat), 23.05.20230327.4bb072f - multi-user?: yes - sandbox: yes - version: nix-env (Nix) 2.13.3 - channels(root): "home-manager, nixos, nixpkgs" - channels(vagahbond): "nixos, nixpkgs" - nixpkgs: /home/vagahbond/.nix-defexpr/channels/nixpkgs

📝 Relevant log output

When running `nixos-rebuild build` : 

~   168s
❯ build 
building the system configuration...
error: builder for '/nix/store/71db83d4r98vhg8am9fpxj1pbpfvqbdx-neovim-0.8.3.drv' failed with exit code 1;
       last 10 log lines:
       > symlinkJoin: warning: keeping existing file: /nix/store/1czj8mydgi30kyfimq6q4ifh06q131ch-neovim-unwrapped-0.8.3/share/locale/nb:
       > symlinkJoin: warning: keeping existing file: /nix/store/1czj8mydgi30kyfimq6q4ifh06q131ch-neovim-unwrapped-0.8.3/share/locale/nb/LC_MESSAGES:
       > symlinkJoin: warning: keeping existing file: /nix/store/1czj8mydgi30kyfimq6q4ifh06q131ch-neovim-unwrapped-0.8.3/share/locale/no:
       > symlinkJoin: warning: keeping existing file: /nix/store/1czj8mydgi30kyfimq6q4ifh06q131ch-neovim-unwrapped-0.8.3/share/locale/no/LC_MESSAGES:
       > Generating remote plugin manifest
       > =11;?Vim: Error reading input, exiting...
       >
       > Vim: Finished.
       > 112(B>5h
       > Generating rplugin.vim failed!
       For full logs, run 'nix log /nix/store/71db83d4r98vhg8am9fpxj1pbpfvqbdx-neovim-0.8.3.drv'.
error: 1 dependencies of derivation '/nix/store/qlmbm7m37qmj9crl0lzsd57b457761r4-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/629jlm7c5nwlplidzfz4a93kqrwhyj5m-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/vn96dabyai27w7fc8aans2d2knh4gy64-unit-home-manager-vagahbond.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/47km1wpzgf5s3n3g3fmsxs5jsjcgzwhm-system-units.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8zkn2l9iqz3l9fwixhb2x9i18lq7dwq5-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/94i7lmc55qci88gdrrp2lbh20sv3bbkr-nixos-system-nixos-23.05.20230327.4bb072f.drv' failed to build

When running the nix log command : nix log /nix/store/71db83d4r98vhg8am9fpxj1pbpfvqbdx-neovim-0.8.3.drv

{...irrelevant...}
symlinkJoin: warning: keeping existing file: /nix/store/1czj8mydgi30kyfimq6q4ifh06q131ch-neovim-unwrapped-0.8.3/share/locale/nb/LC_MESSAGES:
symlinkJoin: warning: keeping existing file: /nix/store/1czj8mydgi30kyfimq6q4ifh06q131ch-neovim-unwrapped-0.8.3/share/locale/no:
symlinkJoin: warning: keeping existing file: /nix/store/1czj8mydgi30kyfimq6q4ifh06q131ch-neovim-unwrapped-0.8.3/share/locale/no/LC_MESSAGES:
Generating remote plugin manifest
Vim: Error reading input, exiting...

Vim: Finished.
[WakaTime] Enter your wakatime.com api key:^M
Generating rplugin.vim failed!

Dracula Theme is broken

⚠️ Please verify that this bug has NOT been reported before.

  • I checked all existing issues and didn't find a similar issue

Description

As far as i can tell, theme.nix expects the entries under setup in supported-themes.nix to be functions, while the dracula entry is a string
https://github.com/NotAShelf/neovim-flake/blob/7a81889afe634fd7314f682e6b59a9f8210caaea/modules/theme/theme.nix#L43-L45
https://github.com/NotAShelf/neovim-flake/blob/7a81889afe634fd7314f682e6b59a9f8210caaea/modules/theme/supported_themes.nix#L29-L34

👟 Reproduction steps

  1. set vim.theme.name to "dracula"
  2. rebuild

👀 Expected behavior

Builds and activates dracula theme

😓 Actual Behavior

Doesn't build, with error: attempt to call something which is not a function but a string

💻 Metadata

  • system: "x86_64-linux" - host os: Linux 6.1.38, NixOS, 23.05 (Stoat), 23.05.20230716.f64b973 - multi-user?: yes - sandbox: yes - version: nix-env (Nix) 2.13.3 - channels(root): "home-manager-22.11.tar.gz, nixos-22.11" - nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

📝 Relevant log output

error: attempt to call something which is not a function but a string

       at /nix/store/kn8y1jchz1hjs4chixw8hqwqvviv7f0z-source/modules/theme/theme.nix:43:29:

           42|     vim.luaConfigRC.themeSetup = nvim.dag.entryBefore ["theme"] cfg.extraConfig;
           43|     vim.luaConfigRC.theme = supported_themes.${cfg.name}.setup (with cfg; {
             |                             ^
           44|       inherit style transparent;
(use '--show-trace' to show detailed location information)

replace kommentary

Kommentary seems to have mostly ceased development. An alternative (if not a complete replacement) could be comment.nvim which has been mentioned on the Kommentary github page.

make flake package configurable

There needs to be a global (both home-manager and nixos) compatible API so that the user may specify a neovim package easily.

Wakatime

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

API Additions

🔖 Feature description

I have always used WakaTime for my stats and it seems like it is not integrated in neovim-flake.
I would love to go on and add it myself but I lack time 😢

What do you think ?

✔️ Solution

I'd like to have an option to enable wakatime and a property to allow me giving it my API.
The actual plugin is well documented.

❓ Alternatives

If you're too lazy(I understand lol) I can propose a PR later when I have the time for it

📝 Additional Context

No response

Java-language-server

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

🏷️ Feature Type

New Addon

🔖 Feature description

title describes the feature.

✔️ Solution

I can make a PR to setup java-language-server like other LSPs, have tested it adding it in my config and it works, just wanna know if i should go ahead with it as most people prefer jdtls but it much harder to setup lol, also with all the changes that might be made to how lsp config works, wondering if it would be the right time to do so

❓ Alternatives

waiting for a while until LSP changes are done and then making a PR

📝 Additional Context

idk anyone who likes java so there isn't any hurry for sure

which-key section and subsection titles

the #14 PR has fixed which-key sections displaying +prefix for plugin specific parent groups, there should be a second PR in which I fix remaining subsections and move duplicate setions (like trouble) under one parent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.