default-config.lua 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875
  1. CONFIG_PATH = os.getenv "HOME" .. "/.local/share/lunarvim/lvim"
  2. DATA_PATH = vim.fn.stdpath "data"
  3. CACHE_PATH = vim.fn.stdpath "cache"
  4. TERMINAL = vim.fn.expand "$TERMINAL"
  5. USER = vim.fn.expand "$USER"
  6. lvim = {
  7. leader = "space",
  8. colorscheme = "spacegray",
  9. line_wrap_cursor_movement = true,
  10. transparent_window = false,
  11. format_on_save = true,
  12. vsnip_dir = os.getenv "HOME" .. "/.config/snippets",
  13. database = { save_location = "~/.config/lunarvim_db", auto_execute = 1 },
  14. keys = {},
  15. -- TODO why do we need this?
  16. builtin = {
  17. lspinstall = {},
  18. telescope = {},
  19. compe = {},
  20. autopairs = {},
  21. treesitter = {},
  22. nvimtree = {},
  23. gitsigns = {},
  24. which_key = {},
  25. comment = {},
  26. rooter = {},
  27. galaxyline = {},
  28. bufferline = {},
  29. dap = {},
  30. dashboard = {},
  31. terminal = {},
  32. },
  33. lsp = {
  34. diagnostics = {
  35. virtual_text = {
  36. prefix = "",
  37. spacing = 0,
  38. },
  39. signs = true,
  40. underline = true,
  41. },
  42. override = {},
  43. document_highlight = true,
  44. popup_border = "single",
  45. default_keybinds = true,
  46. on_attach_callback = nil,
  47. },
  48. plugins = {
  49. -- use lv-config.lua for this not put here
  50. },
  51. autocommands = {},
  52. }
  53. local schemas = nil
  54. local common_on_attach = require("lsp").common_on_attach
  55. local common_capabilities = require("lsp").common_capabilities()
  56. local status_ok, jsonls_settings = pcall(require, "nlspsettings.jsonls")
  57. if status_ok then
  58. schemas = jsonls_settings.get_default_schemas()
  59. end
  60. -- TODO move all of this into lang specific files, only require when using
  61. lvim.lang = {
  62. c = {
  63. formatter = {
  64. exe = "clang_format",
  65. args = {},
  66. stdin = true,
  67. },
  68. linters = {
  69. "clangtidy",
  70. },
  71. lsp = {
  72. provider = "clangd",
  73. setup = {
  74. cmd = {
  75. DATA_PATH .. "/lspinstall/cpp/clangd/bin/clangd",
  76. "--background-index",
  77. "--header-insertion=never",
  78. "--cross-file-rename",
  79. "--clang-tidy",
  80. "--clang-tidy-checks=-*,llvm-*,clang-analyzer-*",
  81. },
  82. on_attach = common_on_attach,
  83. capabilities = common_capabilities,
  84. },
  85. },
  86. },
  87. cpp = {
  88. formatter = {
  89. exe = "clang_format",
  90. args = {},
  91. stdin = true,
  92. },
  93. linters = {
  94. "cppcheck",
  95. "clangtidy",
  96. },
  97. lsp = {
  98. provider = "clangd",
  99. setup = {
  100. cmd = {
  101. DATA_PATH .. "/lspinstall/cpp/clangd/bin/clangd",
  102. "--background-index",
  103. "--header-insertion=never",
  104. "--cross-file-rename",
  105. "--clang-tidy",
  106. "--clang-tidy-checks=-*,llvm-*,clang-analyzer-*",
  107. },
  108. on_attach = common_on_attach,
  109. capabilities = common_capabilities,
  110. },
  111. },
  112. },
  113. cs = {
  114. formatter = {
  115. exe = "",
  116. args = {},
  117. },
  118. linters = {},
  119. lsp = {
  120. provider = "omnisharp",
  121. setup = {
  122. cmd = {
  123. DATA_PATH .. "/lspinstall/csharp/omnisharp/run",
  124. "--stdio",
  125. },
  126. on_attach = common_on_attach,
  127. capabilities = common_capabilities,
  128. },
  129. },
  130. },
  131. cmake = {
  132. formatter = {
  133. exe = "clang_format",
  134. args = {},
  135. },
  136. linters = {},
  137. lsp = {
  138. provider = "cmake",
  139. setup = {
  140. cmd = {
  141. DATA_PATH .. "/lspinstall/cmake/venv/bin/cmake-language-server",
  142. "--stdio",
  143. },
  144. on_attach = common_on_attach,
  145. capabilities = common_capabilities,
  146. },
  147. },
  148. },
  149. clojure = {
  150. formatter = {
  151. exe = "",
  152. args = {},
  153. },
  154. linters = {},
  155. lsp = {
  156. provider = "clojure_lsp",
  157. setup = {
  158. cmd = {
  159. DATA_PATH .. "/lspinstall/clojure/clojure-lsp",
  160. "--stdio",
  161. },
  162. on_attach = common_on_attach,
  163. capabilities = common_capabilities,
  164. },
  165. },
  166. },
  167. css = {
  168. formatter = {
  169. exe = "prettier",
  170. args = {},
  171. },
  172. linters = {},
  173. lsp = {
  174. provider = "cssls",
  175. setup = {
  176. cmd = {
  177. "node",
  178. DATA_PATH .. "/lspinstall/css/vscode-css/css-language-features/server/dist/node/cssServerMain.js",
  179. "--stdio",
  180. },
  181. on_attach = common_on_attach,
  182. capabilities = common_capabilities,
  183. },
  184. },
  185. },
  186. dart = {
  187. formatter = {
  188. exe = "dart",
  189. args = { "format" },
  190. stdin = true,
  191. },
  192. linters = {},
  193. lsp = {
  194. provider = "dartls",
  195. setup = {
  196. cmd = {
  197. "dart",
  198. "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
  199. "--lsp",
  200. },
  201. on_attach = common_on_attach,
  202. capabilities = common_capabilities,
  203. },
  204. },
  205. },
  206. docker = {
  207. formatter = {
  208. exe = "",
  209. args = {},
  210. },
  211. linters = {},
  212. lsp = {
  213. provider = "dockerls",
  214. setup = {
  215. cmd = {
  216. DATA_PATH .. "/lspinstall/dockerfile/node_modules/.bin/docker-langserver",
  217. "--stdio",
  218. },
  219. on_attach = common_on_attach,
  220. capabilities = common_capabilities,
  221. },
  222. },
  223. },
  224. elixir = {
  225. formatter = {
  226. exe = "mix",
  227. args = { "format" },
  228. stdin = true,
  229. },
  230. linters = {},
  231. lsp = {
  232. provider = "elixirls",
  233. setup = {
  234. cmd = {
  235. DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh",
  236. },
  237. on_attach = common_on_attach,
  238. capabilities = common_capabilities,
  239. },
  240. },
  241. },
  242. elm = {
  243. formatter = {
  244. exe = "",
  245. args = {},
  246. stdin = true,
  247. },
  248. linters = {},
  249. lsp = {
  250. provider = "elmls",
  251. setup = {
  252. cmd = {
  253. DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-language-server",
  254. },
  255. on_attach = common_on_attach,
  256. init_options = {
  257. elmAnalyseTrigger = "change",
  258. elmFormatPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-format",
  259. elmPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/",
  260. elmTestPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-test",
  261. },
  262. },
  263. },
  264. },
  265. erlang = {
  266. formatter = {
  267. exe = "",
  268. args = {},
  269. },
  270. linters = {},
  271. lsp = {
  272. provider = "erlangls",
  273. setup = {
  274. cmd = {
  275. "erlang_ls",
  276. },
  277. on_attach = common_on_attach,
  278. capabilities = common_capabilities,
  279. },
  280. },
  281. },
  282. emmet = { active = false },
  283. go = {
  284. formatter = {
  285. exe = "gofmt",
  286. args = {},
  287. stdin = true,
  288. },
  289. linters = {
  290. "golangcilint",
  291. "revive",
  292. },
  293. lsp = {
  294. provider = "gopls",
  295. setup = {
  296. cmd = {
  297. DATA_PATH .. "/lspinstall/go/gopls",
  298. },
  299. on_attach = common_on_attach,
  300. capabilities = common_capabilities,
  301. },
  302. },
  303. },
  304. graphql = {
  305. formatter = {
  306. exe = "",
  307. args = {},
  308. },
  309. linters = {},
  310. lsp = {
  311. provider = "graphql",
  312. setup = {
  313. cmd = {
  314. "graphql-lsp",
  315. "server",
  316. "-m",
  317. "stream",
  318. },
  319. on_attach = common_on_attach,
  320. capabilities = common_capabilities,
  321. },
  322. },
  323. },
  324. html = {
  325. formatter = {
  326. exe = "prettier",
  327. args = {},
  328. },
  329. linters = {
  330. "tidy",
  331. -- https://docs.errata.ai/vale/scoping#html
  332. "vale",
  333. },
  334. lsp = {
  335. provider = "html",
  336. setup = {
  337. cmd = {
  338. "node",
  339. DATA_PATH .. "/lspinstall/html/vscode-html/html-language-features/server/dist/node/htmlServerMain.js",
  340. "--stdio",
  341. },
  342. on_attach = common_on_attach,
  343. capabilities = common_capabilities,
  344. },
  345. },
  346. },
  347. java = {
  348. formatter = {
  349. exe = "prettier",
  350. args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0) },
  351. },
  352. linters = {},
  353. lsp = {
  354. provider = "jdtls",
  355. setup = {
  356. cmd = { DATA_PATH .. "/lspinstall/java/jdtls.sh" },
  357. on_attach = common_on_attach,
  358. capabilities = common_capabilities,
  359. },
  360. },
  361. },
  362. json = {
  363. formatter = {
  364. exe = "python",
  365. args = { "-m", "json.tool" },
  366. stdin = true,
  367. },
  368. linters = {},
  369. lsp = {
  370. provider = "jsonls",
  371. setup = {
  372. cmd = {
  373. "node",
  374. DATA_PATH .. "/lspinstall/json/vscode-json/json-language-features/server/dist/node/jsonServerMain.js",
  375. "--stdio",
  376. },
  377. on_attach = common_on_attach,
  378. capabilities = common_capabilities,
  379. settings = {
  380. json = {
  381. schemas = schemas,
  382. -- = {
  383. -- {
  384. -- fileMatch = { "package.json" },
  385. -- url = "https://json.schemastore.org/package.json",
  386. -- },
  387. -- },
  388. },
  389. },
  390. commands = {
  391. Format = {
  392. function()
  393. vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 })
  394. end,
  395. },
  396. },
  397. },
  398. },
  399. },
  400. julia = {
  401. formatter = {
  402. exe = "",
  403. args = {},
  404. },
  405. linters = {},
  406. lsp = {
  407. provider = "julials",
  408. setup = {
  409. {
  410. "julia",
  411. "--startup-file=no",
  412. "--history-file=no",
  413. -- vim.fn.expand "~/.config/nvim/lua/lsp/julia/run.jl",
  414. CONFIG_PATH .. "/utils/julia/run.jl",
  415. },
  416. on_attach = common_on_attach,
  417. capabilities = common_capabilities,
  418. },
  419. },
  420. },
  421. kotlin = {
  422. lsp = {
  423. provider = "kotlin_language_server",
  424. setup = {
  425. cmd = {
  426. DATA_PATH .. "/lspinstall/kotlin/server/bin/kotlin-language-server",
  427. },
  428. on_attach = common_on_attach,
  429. root_dir = function(fname)
  430. local util = require "lspconfig/util"
  431. local root_files = {
  432. "settings.gradle", -- Gradle (multi-project)
  433. "settings.gradle.kts", -- Gradle (multi-project)
  434. "build.xml", -- Ant
  435. "pom.xml", -- Maven
  436. }
  437. local fallback_root_files = {
  438. "build.gradle", -- Gradle
  439. "build.gradle.kts", -- Gradle
  440. }
  441. return util.root_pattern(unpack(root_files))(fname) or util.root_pattern(unpack(fallback_root_files))(fname)
  442. end,
  443. },
  444. },
  445. },
  446. lua = {
  447. formatter = {
  448. exe = "stylua",
  449. args = {},
  450. },
  451. linters = { "luacheck" },
  452. lsp = {
  453. provider = "sumneko_lua",
  454. setup = {
  455. cmd = {
  456. DATA_PATH .. "/lspinstall/lua/sumneko-lua-language-server",
  457. "-E",
  458. DATA_PATH .. "/lspinstall/lua/main.lua",
  459. },
  460. on_attach = common_on_attach,
  461. settings = {
  462. Lua = {
  463. runtime = {
  464. -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
  465. version = "LuaJIT",
  466. -- Setup your lua path
  467. path = vim.split(package.path, ";"),
  468. },
  469. diagnostics = {
  470. -- Get the language server to recognize the `vim` global
  471. globals = { "vim", "O" },
  472. },
  473. workspace = {
  474. -- Make the server aware of Neovim runtime files
  475. library = {
  476. [vim.fn.expand "~/.local/share/lunarvim/lvim/lua"] = true,
  477. [vim.fn.expand "$VIMRUNTIME/lua"] = true,
  478. [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
  479. },
  480. maxPreload = 100000,
  481. preloadFileSize = 1000,
  482. },
  483. },
  484. },
  485. },
  486. },
  487. },
  488. php = {
  489. formatter = {
  490. exe = "phpcbf",
  491. args = { "--standard=PSR12", vim.api.nvim_buf_get_name(0) },
  492. },
  493. linters = {},
  494. lsp = {
  495. provider = "intelephense",
  496. setup = {
  497. cmd = {
  498. DATA_PATH .. "/lspinstall/php/node_modules/.bin/intelephense",
  499. "--stdio",
  500. },
  501. on_attach = common_on_attach,
  502. filetypes = { "php", "phtml" },
  503. settings = {
  504. intelephense = {
  505. environment = {
  506. phpVersion = "7.4",
  507. },
  508. },
  509. },
  510. },
  511. },
  512. },
  513. javascript = {
  514. -- @usage can be prettier or eslint
  515. formatter = {
  516. exe = "prettier",
  517. args = {},
  518. },
  519. linters = {
  520. "eslint",
  521. },
  522. lsp = {
  523. provider = "tsserver",
  524. setup = {
  525. cmd = {
  526. -- TODO:
  527. DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
  528. "--stdio",
  529. },
  530. on_attach = require("lsp").common_on_attach,
  531. capabilities = require("lsp").common_capabilities(),
  532. },
  533. },
  534. },
  535. javascriptreact = {
  536. -- @usage can be prettier or eslint
  537. formatter = {
  538. exe = "prettier",
  539. args = {},
  540. },
  541. linters = {
  542. "eslint",
  543. },
  544. lsp = {
  545. provider = "tsserver",
  546. setup = {
  547. cmd = {
  548. -- TODO:
  549. DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
  550. "--stdio",
  551. },
  552. on_attach = require("lsp").common_on_attach,
  553. capabilities = require("lsp").common_capabilities(),
  554. },
  555. },
  556. },
  557. python = {
  558. -- @usage can be flake8 or yapf
  559. formatter = {
  560. exe = "black",
  561. args = {},
  562. },
  563. linters = {
  564. "flake8",
  565. "pylint",
  566. "mypy",
  567. },
  568. lsp = {
  569. provider = "pyright",
  570. setup = {
  571. cmd = {
  572. DATA_PATH .. "/lspinstall/python/node_modules/.bin/pyright-langserver",
  573. "--stdio",
  574. },
  575. on_attach = common_on_attach,
  576. capabilities = common_capabilities,
  577. },
  578. },
  579. },
  580. -- R -e 'install.packages("formatR",repos = "http://cran.us.r-project.org")'
  581. -- R -e 'install.packages("readr",repos = "http://cran.us.r-project.org")'
  582. r = {
  583. formatter = {
  584. exe = "R",
  585. args = {
  586. "--slave",
  587. "--no-restore",
  588. "--no-save",
  589. '-e "formatR::tidy_source(text=readr::read_file(file(\\"stdin\\")), arrow=FALSE)"',
  590. },
  591. stdin = true,
  592. },
  593. lsp = {
  594. provider = "r_language_server",
  595. setup = {
  596. cmd = {
  597. "R",
  598. "--slave",
  599. "-e",
  600. "languageserver::run()",
  601. },
  602. on_attach = common_on_attach,
  603. capabilities = common_capabilities,
  604. },
  605. },
  606. },
  607. ruby = {
  608. formatter = {
  609. exe = "rufo",
  610. args = { "-x" },
  611. stdin = true,
  612. },
  613. linters = { "ruby" },
  614. lsp = {
  615. provider = "solargraph",
  616. setup = {
  617. cmd = {
  618. DATA_PATH .. "/lspinstall/ruby/solargraph/solargraph",
  619. "stdio",
  620. },
  621. on_attach = common_on_attach,
  622. capabilities = common_capabilities,
  623. },
  624. },
  625. },
  626. rust = {
  627. formatter = {
  628. exe = "rustfmt",
  629. args = { "--emit=stdout", "--edition=2018" },
  630. stdin = true,
  631. },
  632. lsp = {
  633. provider = "rust_analyzer",
  634. setup = {
  635. cmd = {
  636. DATA_PATH .. "/lspinstall/rust/rust-analyzer",
  637. },
  638. on_attach = common_on_attach,
  639. capabilities = common_capabilities,
  640. },
  641. },
  642. },
  643. scala = {
  644. formatter = {
  645. exe = "",
  646. args = {},
  647. },
  648. linters = { "" },
  649. lsp = {
  650. provider = "metals",
  651. setup = {
  652. on_attach = common_on_attach,
  653. capabilities = common_capabilities,
  654. },
  655. },
  656. },
  657. sh = {
  658. -- @usage can be 'shfmt'
  659. formatter = {
  660. exe = "shfmt",
  661. args = {},
  662. },
  663. -- @usage can be 'shellcheck'
  664. linters = { "shellcheck" },
  665. lsp = {
  666. provider = "bashls",
  667. setup = {
  668. cmd = {
  669. DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server",
  670. "start",
  671. },
  672. on_attach = common_on_attach,
  673. capabilities = common_capabilities,
  674. },
  675. },
  676. },
  677. svelte = {
  678. lsp = {
  679. provider = "svelte",
  680. setup = {
  681. cmd = {
  682. DATA_PATH .. "/lspinstall/svelte/node_modules/.bin/svelteserver",
  683. "--stdio",
  684. },
  685. on_attach = common_on_attach,
  686. capabilities = common_capabilities,
  687. },
  688. },
  689. },
  690. swift = {
  691. formatter = {
  692. exe = "swiftformat",
  693. args = {},
  694. stdin = true,
  695. },
  696. lsp = {
  697. provider = "sourcekit",
  698. setup = {
  699. cmd = {
  700. "xcrun",
  701. "sourcekit-lsp",
  702. },
  703. on_attach = common_on_attach,
  704. capabilities = common_capabilities,
  705. },
  706. },
  707. },
  708. tailwindcss = {
  709. active = false,
  710. filetypes = {
  711. "html",
  712. "css",
  713. "scss",
  714. "javascript",
  715. "javascriptreact",
  716. "typescript",
  717. "typescriptreact",
  718. },
  719. },
  720. terraform = {
  721. formatter = {
  722. exe = "terraform",
  723. args = { "fmt" },
  724. stdin = false,
  725. },
  726. lsp = {
  727. provider = "terraformls",
  728. setup = {
  729. cmd = {
  730. DATA_PATH .. "/lspinstall/terraform/terraform-ls",
  731. "serve",
  732. },
  733. on_attach = common_on_attach,
  734. capabilities = common_capabilities,
  735. },
  736. },
  737. },
  738. typescript = {
  739. -- @usage can be prettier or eslint
  740. formatter = {
  741. exe = "prettier",
  742. args = {},
  743. },
  744. linters = {
  745. "eslint",
  746. },
  747. lsp = {
  748. provider = "tsserver",
  749. setup = {
  750. cmd = {
  751. -- TODO:
  752. DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
  753. "--stdio",
  754. },
  755. on_attach = require("lsp").common_on_attach,
  756. capabilities = require("lsp").common_capabilities(),
  757. },
  758. },
  759. },
  760. typescriptreact = {
  761. -- @usage can be prettier or eslint
  762. formatter = {
  763. exe = "prettier",
  764. args = {},
  765. },
  766. linters = {
  767. "eslint",
  768. },
  769. lsp = {
  770. provider = "tsserver",
  771. setup = {
  772. cmd = {
  773. -- TODO:
  774. DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
  775. "--stdio",
  776. },
  777. on_attach = require("lsp").common_on_attach,
  778. capabilities = require("lsp").common_capabilities(),
  779. },
  780. },
  781. },
  782. vim = {
  783. formatter = {
  784. exe = "",
  785. args = {},
  786. },
  787. linters = { "" },
  788. lsp = {
  789. provider = "vimls",
  790. setup = {
  791. cmd = {
  792. DATA_PATH .. "/lspinstall/vim/node_modules/.bin/vim-language-server",
  793. "--stdio",
  794. },
  795. on_attach = common_on_attach,
  796. capabilities = common_capabilities,
  797. },
  798. },
  799. },
  800. vue = {
  801. formatter = {
  802. exe = "prettier",
  803. args = {
  804. "--stdin-filepath",
  805. "${FILEPATH}",
  806. },
  807. stdin = true,
  808. },
  809. lsp = {
  810. provider = "vetur",
  811. setup = {
  812. cmd = {
  813. DATA_PATH .. "/lspinstall/vue/node_modules/.bin/vls",
  814. },
  815. on_attach = common_on_attach,
  816. capabilities = common_capabilities,
  817. },
  818. },
  819. },
  820. yaml = {
  821. formatter = {
  822. exe = "prettier",
  823. args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0), "--single-quote" },
  824. stdin = true,
  825. },
  826. lsp = {
  827. provider = "yamlls",
  828. setup = {
  829. cmd = {
  830. DATA_PATH .. "/lspinstall/yaml/node_modules/.bin/yaml-language-server",
  831. "--stdio",
  832. },
  833. on_attach = common_on_attach,
  834. capabilities = common_capabilities,
  835. },
  836. },
  837. },
  838. zig = {
  839. formatter = {
  840. exe = "zig",
  841. args = { "fmt" },
  842. stdin = false,
  843. },
  844. lsp = {
  845. provider = "zls",
  846. setup = {
  847. cmd = {
  848. "zls",
  849. },
  850. on_attach = common_on_attach,
  851. capabilities = common_capabilities,
  852. },
  853. },
  854. },
  855. }
  856. require("core.which-key").config()
  857. require "core.status_colors"
  858. require("core.gitsigns").config()
  859. require("core.compe").config()
  860. require("core.dashboard").config()
  861. require("core.dap").config()
  862. require("core.terminal").config()
  863. require("core.telescope").config()
  864. require("core.treesitter").config()
  865. require("core.nvimtree").config()