default-config.lua 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924
  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. "--languageserver",
  125. "--hostPID",
  126. tostring(vim.fn.getpid()),
  127. },
  128. on_attach = common_on_attach,
  129. capabilities = common_capabilities,
  130. },
  131. },
  132. },
  133. cmake = {
  134. formatter = {
  135. exe = "clang_format",
  136. args = {},
  137. },
  138. linters = {},
  139. lsp = {
  140. provider = "cmake",
  141. setup = {
  142. cmd = {
  143. DATA_PATH .. "/lspinstall/cmake/venv/bin/cmake-language-server",
  144. "--stdio",
  145. },
  146. on_attach = common_on_attach,
  147. capabilities = common_capabilities,
  148. },
  149. },
  150. },
  151. clojure = {
  152. formatter = {
  153. exe = "",
  154. args = {},
  155. },
  156. linters = {},
  157. lsp = {
  158. provider = "clojure_lsp",
  159. setup = {
  160. cmd = {
  161. DATA_PATH .. "/lspinstall/clojure/clojure-lsp",
  162. "--stdio",
  163. },
  164. on_attach = common_on_attach,
  165. capabilities = common_capabilities,
  166. },
  167. },
  168. },
  169. css = {
  170. formatter = {
  171. exe = "prettier",
  172. args = {},
  173. },
  174. linters = {},
  175. lsp = {
  176. provider = "cssls",
  177. setup = {
  178. cmd = {
  179. "node",
  180. DATA_PATH .. "/lspinstall/css/vscode-css/css-language-features/server/dist/node/cssServerMain.js",
  181. "--stdio",
  182. },
  183. on_attach = common_on_attach,
  184. capabilities = common_capabilities,
  185. },
  186. },
  187. },
  188. dart = {
  189. formatter = {
  190. exe = "dart",
  191. args = { "format" },
  192. stdin = true,
  193. },
  194. linters = {},
  195. lsp = {
  196. provider = "dartls",
  197. setup = {
  198. cmd = {
  199. "dart",
  200. "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
  201. "--lsp",
  202. },
  203. on_attach = common_on_attach,
  204. capabilities = common_capabilities,
  205. },
  206. },
  207. },
  208. docker = {
  209. formatter = {
  210. exe = "",
  211. args = {},
  212. },
  213. linters = {},
  214. lsp = {
  215. provider = "dockerls",
  216. setup = {
  217. cmd = {
  218. DATA_PATH .. "/lspinstall/dockerfile/node_modules/.bin/docker-langserver",
  219. "--stdio",
  220. },
  221. on_attach = common_on_attach,
  222. capabilities = common_capabilities,
  223. },
  224. },
  225. },
  226. elixir = {
  227. formatter = {
  228. exe = "mix",
  229. args = { "format" },
  230. stdin = true,
  231. },
  232. linters = {},
  233. lsp = {
  234. provider = "elixirls",
  235. setup = {
  236. cmd = {
  237. DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh",
  238. },
  239. on_attach = common_on_attach,
  240. capabilities = common_capabilities,
  241. },
  242. },
  243. },
  244. elm = {
  245. formatter = {
  246. exe = "",
  247. args = {},
  248. stdin = true,
  249. },
  250. linters = {},
  251. lsp = {
  252. provider = "elmls",
  253. setup = {
  254. cmd = {
  255. DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-language-server",
  256. },
  257. on_attach = common_on_attach,
  258. init_options = {
  259. elmAnalyseTrigger = "change",
  260. elmFormatPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-format",
  261. elmPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/",
  262. elmTestPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-test",
  263. },
  264. },
  265. },
  266. },
  267. erlang = {
  268. formatter = {
  269. exe = "",
  270. args = {},
  271. },
  272. linters = {},
  273. lsp = {
  274. provider = "erlangls",
  275. setup = {
  276. cmd = {
  277. "erlang_ls",
  278. },
  279. on_attach = common_on_attach,
  280. capabilities = common_capabilities,
  281. },
  282. },
  283. },
  284. emmet = { active = false },
  285. fish = {
  286. formatter = {
  287. exe = "",
  288. args = {},
  289. },
  290. linters = {},
  291. lsp = {
  292. provider = "",
  293. setup = {
  294. on_attach = common_on_attach,
  295. capabilities = common_capabilities,
  296. },
  297. },
  298. },
  299. go = {
  300. formatter = {
  301. exe = "gofmt",
  302. args = {},
  303. stdin = true,
  304. },
  305. linters = {
  306. "golangcilint",
  307. "revive",
  308. },
  309. lsp = {
  310. provider = "gopls",
  311. setup = {
  312. cmd = {
  313. DATA_PATH .. "/lspinstall/go/gopls",
  314. },
  315. on_attach = common_on_attach,
  316. capabilities = common_capabilities,
  317. },
  318. },
  319. },
  320. graphql = {
  321. formatter = {
  322. exe = "",
  323. args = {},
  324. },
  325. linters = {},
  326. lsp = {
  327. provider = "graphql",
  328. setup = {
  329. cmd = {
  330. "graphql-lsp",
  331. "server",
  332. "-m",
  333. "stream",
  334. },
  335. on_attach = common_on_attach,
  336. capabilities = common_capabilities,
  337. },
  338. },
  339. },
  340. html = {
  341. formatter = {
  342. exe = "prettier",
  343. args = {},
  344. },
  345. linters = {
  346. "tidy",
  347. -- https://docs.errata.ai/vale/scoping#html
  348. "vale",
  349. },
  350. lsp = {
  351. provider = "html",
  352. setup = {
  353. cmd = {
  354. "node",
  355. DATA_PATH .. "/lspinstall/html/vscode-html/html-language-features/server/dist/node/htmlServerMain.js",
  356. "--stdio",
  357. },
  358. on_attach = common_on_attach,
  359. capabilities = common_capabilities,
  360. },
  361. },
  362. },
  363. java = {
  364. formatter = {
  365. exe = "prettier",
  366. args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0) },
  367. },
  368. linters = {},
  369. lsp = {
  370. provider = "jdtls",
  371. setup = {
  372. cmd = { DATA_PATH .. "/lspinstall/java/jdtls.sh" },
  373. on_attach = common_on_attach,
  374. capabilities = common_capabilities,
  375. },
  376. },
  377. },
  378. json = {
  379. formatter = {
  380. exe = "python",
  381. args = { "-m", "json.tool" },
  382. stdin = true,
  383. },
  384. linters = {},
  385. lsp = {
  386. provider = "jsonls",
  387. setup = {
  388. cmd = {
  389. "node",
  390. DATA_PATH .. "/lspinstall/json/vscode-json/json-language-features/server/dist/node/jsonServerMain.js",
  391. "--stdio",
  392. },
  393. on_attach = common_on_attach,
  394. capabilities = common_capabilities,
  395. settings = {
  396. json = {
  397. schemas = schemas,
  398. -- = {
  399. -- {
  400. -- fileMatch = { "package.json" },
  401. -- url = "https://json.schemastore.org/package.json",
  402. -- },
  403. -- },
  404. },
  405. },
  406. commands = {
  407. Format = {
  408. function()
  409. vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 })
  410. end,
  411. },
  412. },
  413. },
  414. },
  415. },
  416. julia = {
  417. formatter = {
  418. exe = "",
  419. args = {},
  420. },
  421. linters = {},
  422. lsp = {
  423. provider = "julials",
  424. setup = {
  425. {
  426. "julia",
  427. "--startup-file=no",
  428. "--history-file=no",
  429. -- vim.fn.expand "~/.config/nvim/lua/lsp/julia/run.jl",
  430. CONFIG_PATH .. "/utils/julia/run.jl",
  431. },
  432. on_attach = common_on_attach,
  433. capabilities = common_capabilities,
  434. },
  435. },
  436. },
  437. kotlin = {
  438. formatter = {
  439. exe = "",
  440. args = {},
  441. },
  442. linters = {},
  443. lsp = {
  444. provider = "kotlin_language_server",
  445. setup = {
  446. cmd = {
  447. DATA_PATH .. "/lspinstall/kotlin/server/bin/kotlin-language-server",
  448. },
  449. on_attach = common_on_attach,
  450. root_dir = function(fname)
  451. local util = require "lspconfig/util"
  452. local root_files = {
  453. "settings.gradle", -- Gradle (multi-project)
  454. "settings.gradle.kts", -- Gradle (multi-project)
  455. "build.xml", -- Ant
  456. "pom.xml", -- Maven
  457. }
  458. local fallback_root_files = {
  459. "build.gradle", -- Gradle
  460. "build.gradle.kts", -- Gradle
  461. }
  462. return util.root_pattern(unpack(root_files))(fname) or util.root_pattern(unpack(fallback_root_files))(fname)
  463. end,
  464. },
  465. },
  466. },
  467. lua = {
  468. formatter = {
  469. exe = "stylua",
  470. args = {},
  471. },
  472. linters = { "luacheck" },
  473. lsp = {
  474. provider = "sumneko_lua",
  475. setup = {
  476. cmd = {
  477. DATA_PATH .. "/lspinstall/lua/sumneko-lua-language-server",
  478. "-E",
  479. DATA_PATH .. "/lspinstall/lua/main.lua",
  480. },
  481. on_attach = common_on_attach,
  482. settings = {
  483. Lua = {
  484. runtime = {
  485. -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
  486. version = "LuaJIT",
  487. -- Setup your lua path
  488. path = vim.split(package.path, ";"),
  489. },
  490. diagnostics = {
  491. -- Get the language server to recognize the `vim` global
  492. globals = { "vim", "lvim" },
  493. },
  494. workspace = {
  495. -- Make the server aware of Neovim runtime files
  496. library = {
  497. [vim.fn.expand "~/.local/share/lunarvim/lvim/lua"] = true,
  498. [vim.fn.expand "$VIMRUNTIME/lua"] = true,
  499. [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
  500. },
  501. maxPreload = 100000,
  502. preloadFileSize = 1000,
  503. },
  504. },
  505. },
  506. },
  507. },
  508. },
  509. php = {
  510. formatter = {
  511. exe = "phpcbf",
  512. args = { "--standard=PSR12", vim.api.nvim_buf_get_name(0) },
  513. },
  514. linters = {},
  515. lsp = {
  516. provider = "intelephense",
  517. setup = {
  518. cmd = {
  519. DATA_PATH .. "/lspinstall/php/node_modules/.bin/intelephense",
  520. "--stdio",
  521. },
  522. on_attach = common_on_attach,
  523. filetypes = { "php", "phtml" },
  524. settings = {
  525. intelephense = {
  526. environment = {
  527. phpVersion = "7.4",
  528. },
  529. },
  530. },
  531. },
  532. },
  533. },
  534. puppet = {
  535. formatter = {
  536. exe = "",
  537. args = {},
  538. },
  539. linters = {},
  540. lsp = {
  541. provider = "puppet",
  542. setup = {
  543. on_attach = require("lsp").common_on_attach,
  544. capabilities = require("lsp").common_capabilities(),
  545. },
  546. },
  547. },
  548. javascript = {
  549. -- @usage can be prettier or eslint
  550. formatter = {
  551. exe = "prettier",
  552. args = {},
  553. },
  554. linters = {
  555. "eslint",
  556. },
  557. lsp = {
  558. provider = "tsserver",
  559. setup = {
  560. cmd = {
  561. -- TODO:
  562. DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
  563. "--stdio",
  564. },
  565. on_attach = require("lsp").common_on_attach,
  566. capabilities = require("lsp").common_capabilities(),
  567. },
  568. },
  569. },
  570. javascriptreact = {
  571. -- @usage can be prettier or eslint
  572. formatter = {
  573. exe = "prettier",
  574. args = {},
  575. },
  576. linters = {
  577. "eslint",
  578. },
  579. lsp = {
  580. provider = "tsserver",
  581. setup = {
  582. cmd = {
  583. -- TODO:
  584. DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
  585. "--stdio",
  586. },
  587. on_attach = require("lsp").common_on_attach,
  588. capabilities = require("lsp").common_capabilities(),
  589. },
  590. },
  591. },
  592. python = {
  593. -- @usage can be flake8 or yapf
  594. formatter = {
  595. exe = "black",
  596. args = {},
  597. },
  598. linters = {
  599. "flake8",
  600. "pylint",
  601. "mypy",
  602. },
  603. lsp = {
  604. provider = "pyright",
  605. setup = {
  606. cmd = {
  607. DATA_PATH .. "/lspinstall/python/node_modules/.bin/pyright-langserver",
  608. "--stdio",
  609. },
  610. on_attach = common_on_attach,
  611. capabilities = common_capabilities,
  612. },
  613. },
  614. },
  615. -- R -e 'install.packages("formatR",repos = "http://cran.us.r-project.org")'
  616. -- R -e 'install.packages("readr",repos = "http://cran.us.r-project.org")'
  617. r = {
  618. formatter = {
  619. exe = "",
  620. args = {},
  621. },
  622. linters = {},
  623. lsp = {
  624. provider = "r_language_server",
  625. setup = {
  626. cmd = {
  627. "R",
  628. "--slave",
  629. "-e",
  630. "languageserver::run()",
  631. },
  632. on_attach = common_on_attach,
  633. capabilities = common_capabilities,
  634. },
  635. },
  636. },
  637. ruby = {
  638. formatter = {
  639. exe = "rufo",
  640. args = {},
  641. },
  642. linters = { "ruby" },
  643. lsp = {
  644. provider = "solargraph",
  645. setup = {
  646. cmd = {
  647. DATA_PATH .. "/lspinstall/ruby/solargraph/solargraph",
  648. "stdio",
  649. },
  650. on_attach = common_on_attach,
  651. capabilities = common_capabilities,
  652. },
  653. },
  654. },
  655. rust = {
  656. formatter = {
  657. exe = "",
  658. args = {},
  659. },
  660. linters = {},
  661. lsp = {
  662. provider = "rust_analyzer",
  663. setup = {
  664. cmd = {
  665. DATA_PATH .. "/lspinstall/rust/rust-analyzer",
  666. },
  667. on_attach = common_on_attach,
  668. capabilities = common_capabilities,
  669. },
  670. },
  671. },
  672. scala = {
  673. formatter = {
  674. exe = "",
  675. args = {},
  676. },
  677. linters = { "" },
  678. lsp = {
  679. provider = "metals",
  680. setup = {
  681. on_attach = common_on_attach,
  682. capabilities = common_capabilities,
  683. },
  684. },
  685. },
  686. sh = {
  687. -- @usage can be 'shfmt'
  688. formatter = {
  689. exe = "shfmt",
  690. args = {},
  691. },
  692. -- @usage can be 'shellcheck'
  693. linters = { "shellcheck" },
  694. lsp = {
  695. provider = "bashls",
  696. setup = {
  697. cmd = {
  698. DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server",
  699. "start",
  700. },
  701. on_attach = common_on_attach,
  702. capabilities = common_capabilities,
  703. },
  704. },
  705. },
  706. svelte = {
  707. formatter = {
  708. exe = "",
  709. args = {},
  710. },
  711. linters = {},
  712. lsp = {
  713. provider = "svelte",
  714. setup = {
  715. cmd = {
  716. DATA_PATH .. "/lspinstall/svelte/node_modules/.bin/svelteserver",
  717. "--stdio",
  718. },
  719. on_attach = common_on_attach,
  720. capabilities = common_capabilities,
  721. },
  722. },
  723. },
  724. swift = {
  725. formatter = {
  726. exe = "swiftformat",
  727. args = {},
  728. },
  729. linters = {},
  730. lsp = {
  731. provider = "sourcekit",
  732. setup = {
  733. cmd = {
  734. "xcrun",
  735. "sourcekit-lsp",
  736. },
  737. on_attach = common_on_attach,
  738. capabilities = common_capabilities,
  739. },
  740. },
  741. },
  742. tailwindcss = {
  743. active = false,
  744. filetypes = {
  745. "html",
  746. "css",
  747. "scss",
  748. "javascript",
  749. "javascriptreact",
  750. "typescript",
  751. "typescriptreact",
  752. },
  753. },
  754. terraform = {
  755. formatter = {
  756. exe = "",
  757. args = {},
  758. stdin = false,
  759. },
  760. linters = {},
  761. lsp = {
  762. provider = "terraformls",
  763. setup = {
  764. cmd = {
  765. DATA_PATH .. "/lspinstall/terraform/terraform-ls",
  766. "serve",
  767. },
  768. on_attach = common_on_attach,
  769. capabilities = common_capabilities,
  770. },
  771. },
  772. },
  773. tex = {
  774. formatter = {
  775. exe = "latexindent",
  776. args = {},
  777. stdin = false,
  778. },
  779. linters = { "chktex" },
  780. lsp = {
  781. provider = "texlab",
  782. setup = {
  783. cmd = { DATA_PATH .. "/lspinstall/latex/texlab" },
  784. on_attach = common_on_attach,
  785. capabilities = common_capabilities,
  786. },
  787. },
  788. },
  789. typescript = {
  790. -- @usage can be prettier or eslint
  791. formatter = {
  792. exe = "prettier",
  793. args = {},
  794. },
  795. linters = {
  796. "eslint",
  797. },
  798. lsp = {
  799. provider = "tsserver",
  800. setup = {
  801. cmd = {
  802. -- TODO:
  803. DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
  804. "--stdio",
  805. },
  806. on_attach = require("lsp").common_on_attach,
  807. capabilities = require("lsp").common_capabilities(),
  808. },
  809. },
  810. },
  811. typescriptreact = {
  812. -- @usage can be prettier or eslint
  813. formatter = {
  814. exe = "prettier",
  815. args = {},
  816. },
  817. linters = {
  818. "eslint",
  819. },
  820. lsp = {
  821. provider = "tsserver",
  822. setup = {
  823. cmd = {
  824. -- TODO:
  825. DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
  826. "--stdio",
  827. },
  828. on_attach = require("lsp").common_on_attach,
  829. capabilities = require("lsp").common_capabilities(),
  830. },
  831. },
  832. },
  833. vim = {
  834. formatter = {
  835. exe = "",
  836. args = {},
  837. },
  838. linters = { "" },
  839. lsp = {
  840. provider = "vimls",
  841. setup = {
  842. cmd = {
  843. DATA_PATH .. "/lspinstall/vim/node_modules/.bin/vim-language-server",
  844. "--stdio",
  845. },
  846. on_attach = common_on_attach,
  847. capabilities = common_capabilities,
  848. },
  849. },
  850. },
  851. vue = {
  852. formatter = {
  853. exe = "prettier",
  854. args = {},
  855. },
  856. linters = {},
  857. lsp = {
  858. provider = "vetur",
  859. setup = {
  860. cmd = {
  861. DATA_PATH .. "/lspinstall/vue/node_modules/.bin/vls",
  862. },
  863. on_attach = common_on_attach,
  864. capabilities = common_capabilities,
  865. },
  866. },
  867. },
  868. yaml = {
  869. formatter = {
  870. exe = "prettier",
  871. args = {},
  872. },
  873. linters = {},
  874. lsp = {
  875. provider = "yamlls",
  876. setup = {
  877. cmd = {
  878. DATA_PATH .. "/lspinstall/yaml/node_modules/.bin/yaml-language-server",
  879. "--stdio",
  880. },
  881. on_attach = common_on_attach,
  882. capabilities = common_capabilities,
  883. },
  884. },
  885. },
  886. zig = {
  887. formatter = {
  888. exe = "",
  889. args = {},
  890. stdin = false,
  891. },
  892. linters = {},
  893. lsp = {
  894. provider = "zls",
  895. setup = {
  896. cmd = {
  897. "zls",
  898. },
  899. on_attach = common_on_attach,
  900. capabilities = common_capabilities,
  901. },
  902. },
  903. },
  904. }
  905. require("core.which-key").config()
  906. require "core.status_colors"
  907. require("core.gitsigns").config()
  908. require("core.compe").config()
  909. require("core.dashboard").config()
  910. require("core.dap").config()
  911. require("core.terminal").config()
  912. require("core.telescope").config()
  913. require("core.treesitter").config()
  914. require("core.nvimtree").config()