mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-08 22:45:30 +00:00
languages/yaml: corrected type issue by converting string to luaInLine
This commit is contained in:
parent
1a053852d2
commit
21edaf39be
1 changed files with 13 additions and 8 deletions
|
|
@ -11,19 +11,24 @@
|
||||||
inherit (lib.types) enum;
|
inherit (lib.types) enum;
|
||||||
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
|
||||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||||
|
inherit (lib.generators) mkLuaInline;
|
||||||
|
|
||||||
cfg = config.vim.languages.yaml;
|
cfg = config.vim.languages.yaml;
|
||||||
|
|
||||||
onAttach =
|
onAttach =
|
||||||
if config.vim.languages.helm.lsp.enable
|
if config.vim.languages.helm.lsp.enable
|
||||||
then ''
|
then
|
||||||
on_attach = function(client, bufnr)
|
mkLuaInline ''
|
||||||
|
function(client, bufnr)
|
||||||
local filetype = vim.bo[bufnr].filetype
|
local filetype = vim.bo[bufnr].filetype
|
||||||
if filetype == "helm" then
|
if filetype == "helm" then
|
||||||
client.stop()
|
client.stop()
|
||||||
end
|
end
|
||||||
end''
|
end''
|
||||||
else "on_attach = default_on_attach";
|
else
|
||||||
|
mkLuaInline ''
|
||||||
|
default_on_attach
|
||||||
|
'';
|
||||||
|
|
||||||
defaultServers = ["yaml-language-server"];
|
defaultServers = ["yaml-language-server"];
|
||||||
servers = {
|
servers = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue