Compare commits

...

31 commits

Author SHA1 Message Date
Soliprem
3b147f2d29
Merge a1718bbcd6 into cc14a1c1f6 2024-10-05 12:21:42 +02:00
poz
cc14a1c1f6
plugins/neo-tree: fix file icons (#397)
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
2024-10-04 17:00:17 +03:00
Soliprem
a1718bbcd6 kotlin: changelog update 2024-09-30 14:42:51 +02:00
Soliprem
fc08c34b9d removing artifacts from merge 2024-09-30 14:36:40 +02:00
Soliprem
b12e24a564 removing haskell from kotlin branch 2024-09-30 14:35:29 +02:00
Soliprem
657b6fb0d2 merge 2024-09-30 14:31:33 +02:00
Soliprem
7b46366e53 kotlin: LSP and treesitter working 2024-09-30 12:43:04 +02:00
Soliprem
4163de716c haskell: LSP cmd definition (currently broken) 2024-09-27 20:18:28 +02:00
Soliprem
f6fb1ba498 haskell: LSP cmd definition 2024-09-27 18:18:54 +02:00
Soliprem
1ece52ed42 kotlin: LSP and treesitter 2024-09-27 18:14:03 +02:00
Soliprem
dd2f73ba84 haskell: haskell support 2024-09-27 17:44:23 +02:00
Soliprem
be5832cf65 haskell: default to isMaximal 2024-09-27 17:43:45 +02:00
Soliprem
c942c6ae23 haskell: added LSP and treesitter 2024-09-27 16:54:14 +02:00
Soliprem
c5c026a185 otter: better changelog 2024-09-27 16:43:04 +02:00
Soliprem
cf8764ff96 otter: changelog 2024-09-27 16:37:38 +02:00
Soliprem
5bbc68f5e9 configuration: otter set for isMaximal 2024-09-27 16:27:40 +02:00
Soliprem
d8d834be35 added assertion to make sure ccc and otter aren't enabled at the same time 2024-09-27 16:20:49 +02:00
Soliprem
51710d33c6 configuration: disabling ccc and enabling otter 2024-09-27 16:20:04 +02:00
Soliprem
e12c9adec9 fixed typo 2024-09-27 14:16:43 +02:00
Soliprem
19ae4946a2 committing flake.lock 2024-09-27 11:35:39 +02:00
Soliprem
28edf0de19 merging 2024-09-27 10:33:33 +02:00
Soliprem
66c173748e otter: fixing fixing input 2024-09-27 10:32:07 +02:00
Soliprem
4f151d63be update 2024-09-27 10:09:43 +02:00
Soliprem
06a296a32b update 2024-09-27 09:55:03 +02:00
Soliprem
d61aba1e12 created otter file 2024-09-27 09:46:30 +02:00
Soliprem
3275ab221a created otter file 2024-09-27 09:27:58 +02:00
Soliprem
27c045bc9d added changelog entry 2024-09-24 12:59:42 +02:00
Soliprem
42d7294a5e r: changing treesitter package definition to mkGrammarOption 2024-09-24 12:34:56 +02:00
Soliprem
ae90ed1706 r: version bump to context fixes treesitter bug 2024-09-24 12:21:30 +02:00
Soliprem
a9aeabb5f3 Merge branch 'main' of https://github.com/NotAShelf/nvf
merge
2024-09-24 10:55:09 +02:00
Soliprem
6915c3f764 r: implementing lsp 2024-09-20 14:29:07 +02:00
5 changed files with 84 additions and 1 deletions

View file

@ -51,6 +51,7 @@ isMaximal: {
css.enable = isMaximal;
sql.enable = isMaximal;
java.enable = isMaximal;
kotlin.enable = isMaximal;
ts.enable = isMaximal;
svelte.enable = isMaximal;
go.enable = isMaximal;

View file

@ -80,13 +80,16 @@ everyone.
[ocaml-lsp]: https://github.com/ocaml/ocaml-lsp
[new-file-template.nvim]: https://github.com/otavioschwanck/new-file-template.nvim
[neo-tree.nvim]: https://github.com/nvim-neo-tree/neo-tree.nvim
- Add [ocaml-lsp] support
- Fix "Emac" typo
- Add [new-file-template.nvim] to automatically fill new file contents using
templates.
templates
- Make [neo-tree.nvim] display file icons properly by enabling `visuals.nvimWebDevicons`
[diniamo](https://github.com/diniamo):
@ -208,3 +211,4 @@ everyone.
- 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
- Add LSP and Treesitter support for Kotlin under `vim.languages.kotlin`

View file

@ -20,6 +20,8 @@ in {
"neo-tree-nvim"
];
visuals.nvimWebDevicons.enable = true;
pluginRC.neo-tree = entryAnywhere ''
require("neo-tree").setup(${toLuaObject cfg.setupOpts})
'';

View file

@ -8,6 +8,7 @@ in {
./css.nix
./elixir.nix
./go.nix
./kotlin.nix
./html.nix
./java.nix
./lua.nix

View file

@ -0,0 +1,75 @@
{
config,
pkgs,
lib,
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.types) package;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.lists) isList;
inherit (lib.nvim.lua) expToLua;
cfg = config.vim.languages.kotlin;
# Creating a version of the LSP with access to the kotlin binary.
# This is necessary for the LSP to load the standard library
kotlinLspWithRuntime = pkgs.symlinkJoin {
name = "kotlin-language-server-with-runtime";
paths = [
pkgs.kotlin-language-server
pkgs.kotlin
];
buildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram $out/bin/kotlin-language-server \
--prefix PATH : ${pkgs.lib.makeBinPath [pkgs.kotlin]}
'';
};
in {
options.vim.languages.kotlin = {
enable = mkEnableOption "kotlin/HCL support";
treesitter = {
enable = mkEnableOption "kotlin treesitter" // {default = config.vim.languages.enableTreesitter;};
package = mkGrammarOption pkgs "kotlin";
};
lsp = {
enable = mkEnableOption "kotlin LSP support (kotlin_language_server)" // {default = config.vim.languages.enableLSP;};
package = mkOption {
description = "kotlin_language_server package with Kotlin runtime";
type = package;
default = kotlinLspWithRuntime;
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.kotlin_language_server = ''
lspconfig.kotlin_language_server.setup {
capabilities = capabilities,
root_dir = lspconfig.util.root_pattern("main.kt", ".git"),
on_attach=default_on_attach,
init_options = {
-- speeds up the startup time for the LSP
storagePath = "vim.fn.stdpath('state') .. '/kotlin'",
},
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/kotlin-language-server"}''
},
}
'';
})
]);
}