parent
6753c39ccd
commit
8deffb3adb
12 changed files with 64 additions and 193 deletions
common/home/neovim/langs
|
@ -31,12 +31,7 @@ in
|
|||
});
|
||||
'';
|
||||
|
||||
coc.settings = {
|
||||
bashIde.shellcheckPath = "${pkgs.shellcheck}/bin/shellcheck";
|
||||
};
|
||||
|
||||
plugins = [
|
||||
vimPlugins.coc-sh
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -16,8 +16,6 @@ in
|
|||
];
|
||||
|
||||
plugins = [
|
||||
vimPlugins.coc-clangd
|
||||
vimPlugins.coc-cmake
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
{...}: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.vars) neovimIde;
|
||||
inherit (pkgs) vimPlugins;
|
||||
in {
|
||||
imports = [
|
||||
./bash.nix
|
||||
./clang.nix
|
||||
|
@ -10,4 +18,40 @@
|
|||
./python.nix
|
||||
./web.nix
|
||||
];
|
||||
|
||||
programs = lib.mkIf neovimIde {
|
||||
neovim = {
|
||||
extraLuaConfig = lib.mkBefore
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
''
|
||||
-- Start completion / snippet stuff
|
||||
vim.g.coq_settings = { auto_start = true };
|
||||
|
||||
-- Add formatting cmd
|
||||
vim.api.nvim_create_user_command(
|
||||
'Format',
|
||||
function()
|
||||
vim.lsp.buf.format({ async = true });
|
||||
end,
|
||||
{}
|
||||
);
|
||||
|
||||
-- Remove LSP highlighting to use Treesitter
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(args)
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
client.server_capabilities.semanticTokensProvider = nil
|
||||
end,
|
||||
});
|
||||
'';
|
||||
plugins = [
|
||||
vimPlugins.nvim-lspconfig
|
||||
vimPlugins.coq_nvim
|
||||
vimPlugins.coq-artifacts
|
||||
vimPlugins.coq-thirdparty
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -37,25 +37,7 @@ in
|
|||
});
|
||||
'';
|
||||
|
||||
coc.settings.java = {
|
||||
maven.downloadSources = true;
|
||||
eclipse.downloadSources = true;
|
||||
|
||||
format.settings.url = "eclipse-formatter.xml";
|
||||
|
||||
jdt.ls = {
|
||||
java.home = "${javaSdk}";
|
||||
statusIcons = {
|
||||
"busy" = "Busy";
|
||||
"ready" = "OK";
|
||||
"warning" = "Warning";
|
||||
"error" = "Error";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
plugins = [
|
||||
vimPlugins.coc-java
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -10,29 +10,8 @@ in
|
|||
lib.mkIf neovimIde {
|
||||
programs = {
|
||||
neovim = {
|
||||
coc.settings = {
|
||||
Lua = {
|
||||
misc.parameters = [
|
||||
"--metapath"
|
||||
"~/.cache/sumneko_lua/meta"
|
||||
"--logpath"
|
||||
"~/.cache/sumneko_lua/log"
|
||||
];
|
||||
workspace.library = [
|
||||
"$\{3rd\}/luv/library"
|
||||
];
|
||||
};
|
||||
sumneko-lua = {
|
||||
serverDir = "${pkgs.lua-language-server}/share/lua-language-server";
|
||||
enableNvimLuaDev = true;
|
||||
};
|
||||
};
|
||||
|
||||
plugins = [
|
||||
vimPlugins.coc-sumneko-lua
|
||||
vimPlugins.neodev-nvim
|
||||
|
||||
vimPlugins.coc-vimlsp
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -17,20 +17,8 @@ in
|
|||
lib.mkIf neovimIde {
|
||||
programs = {
|
||||
neovim = {
|
||||
coc.settings = {
|
||||
markdownlint.config = {
|
||||
no-trailing-spaces = true;
|
||||
no-multiple-blanks = false;
|
||||
no-duplicate-heading = false;
|
||||
line-length = {
|
||||
tables = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
plugins = [
|
||||
vimPlugins.markdown-preview-nvim
|
||||
vimPlugins.coc-markdownlint
|
||||
{
|
||||
plugin = buildPlugin "easytables-nvim" vimplugin-easytables-src;
|
||||
type = "lua";
|
||||
|
|
|
@ -50,12 +50,16 @@ in
|
|||
nixdPkg
|
||||
];
|
||||
|
||||
coc.settings.languageserver = {
|
||||
nix = {
|
||||
command = "nixd";
|
||||
filetypes = ["nix"];
|
||||
};
|
||||
};
|
||||
extraLuaConfig =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
''
|
||||
local lsp = require('lspconfig')
|
||||
|
||||
lsp.nixd.setup({});
|
||||
lsp.nixd.setup(require('coq').lsp_ensure_capabilities({}));
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ in
|
|||
];
|
||||
|
||||
plugins = [
|
||||
vimPlugins.coc-pyright
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -2,13 +2,10 @@
|
|||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
coc-stylelintplus,
|
||||
...
|
||||
}: let
|
||||
inherit (config.vars) neovimIde;
|
||||
inherit (pkgs) vimPlugins;
|
||||
|
||||
coc-stylelintplus-flake = coc-stylelintplus.packages.${pkgs.system}.default;
|
||||
in
|
||||
lib.mkIf neovimIde {
|
||||
programs = {
|
||||
|
@ -42,31 +39,7 @@ in
|
|||
});
|
||||
'';
|
||||
|
||||
coc.settings = {
|
||||
# ESLint
|
||||
eslint = {
|
||||
format.enable = true;
|
||||
autoFixOnSave = true;
|
||||
};
|
||||
|
||||
# Stylelint
|
||||
stylelintplus = {
|
||||
enable = true;
|
||||
cssInJs = true;
|
||||
autoFixOnSave = true;
|
||||
autoFixOnFormat = true;
|
||||
};
|
||||
css.validate = false;
|
||||
less.validate = false;
|
||||
scss.validate = false;
|
||||
wxss.validate = false;
|
||||
};
|
||||
|
||||
plugins = [
|
||||
vimPlugins.coc-css
|
||||
vimPlugins.coc-eslint
|
||||
coc-stylelintplus-flake
|
||||
vimPlugins.coc-tsserver
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue