feat(nvim): add lsp status on lualine

This commit is contained in:
matt1432 2023-11-22 16:22:00 -05:00
parent 1fae0a73d3
commit 13e83c7dfd
2 changed files with 49 additions and 30 deletions

View file

@ -61,42 +61,48 @@ in {
enable = true; enable = true;
settings = { settings = {
# General # General
"colors.enable" = true; colors.enable = true;
"coc.preferences.formatOnType" = true; coc.preferences.formatOnType = true;
"diagnostic.checkCurrentLine" = true; diagnostic.checkCurrentLine = true;
"inlayHint.enable" = false; inlayHint.enable = false;
# Eslint # ESLint
"eslint.format.enable" = true; eslint = {
"eslint.autoFixOnSave" = true; format.enable = true;
autoFixOnSave = true;
};
# Stylelint # Stylelint
"stylelintplus.enable" = true; stylelintplus = {
"stylelintplus.cssInJs" = true; enable = true;
"stylelintplus.autoFixOnSave" = true; cssInJs = true;
"stylelintplus.autoFixOnFormat" = true; autoFixOnSave = true;
"css.validate" = false; autoFixOnFormat = true;
"less.validate" = false; };
"scss.validate" = false; css.validate = false;
"wxss.validate" = false; less.validate = false;
scss.validate = false;
wxss.validate = false;
# Lua lsp # Lua
"Lua.misc.parameters" = [ Lua = {
"--metapath" misc.parameters = [
"~/.cache/sumneko_lua/meta" "--metapath"
"--logpath" "~/.cache/sumneko_lua/meta"
"~/.cache/sumneko_lua/log" "--logpath"
]; "~/.cache/sumneko_lua/log"
"Lua.workspace.library" = [ ];
"$\{3rd\}/luv/library" workspace.library = [
]; "$\{3rd\}/luv/library"
];
};
sumneko-lua = { sumneko-lua = {
serverDir = "${pkgs.lua-language-server}/share/lua-language-server"; serverDir = "${pkgs.lua-language-server}/share/lua-language-server";
enableNvimLuaDev = true; enableNvimLuaDev = true;
}; };
# Nix
languageserver = { languageserver = {
# Nix
nix = { nix = {
command = "nil"; command = "nil";
filetypes = ["nix"]; filetypes = ["nix"];
@ -109,9 +115,19 @@ in {
}; };
}; };
# Misc # Java
"java.jdt.ls.java.home" = "${pkgs.temurin-bin-17}"; java.jdt.ls = {
"bashIde.shellcheckPath" = "${pkgs.shellcheck}/bin/shellcheck"; java.home = "${pkgs.temurin-bin-17}";
statusIcons = {
"busy" = "Busy";
"ready" = "OK";
"warning" = "Warning";
"error" = "Error";
};
};
# Bash
bashIde.shellcheckPath = "${pkgs.shellcheck}/bin/shellcheck";
}; };
}; };

View file

@ -1,6 +1,9 @@
require('lualine').setup({ require('lualine').setup({
options = { options = {
theme = 'dracula', theme = 'dracula',
globalstatus = true globalstatus = true,
},
sections = {
lualine_x = {'g:coc_status', 'bo:filetype'},
} }
}) })