default-config.lua 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861
  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 = "",
  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. sh = {
  644. -- @usage can be 'shfmt'
  645. formatter = {
  646. exe = "shfmt",
  647. args = {},
  648. },
  649. -- @usage can be 'shellcheck'
  650. linters = { "shellcheck" },
  651. lsp = {
  652. provider = "bashls",
  653. setup = {
  654. cmd = {
  655. DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server",
  656. "start",
  657. },
  658. on_attach = common_on_attach,
  659. capabilities = common_capabilities,
  660. },
  661. },
  662. },
  663. svelte = {
  664. lsp = {
  665. provider = "svelte",
  666. setup = {
  667. cmd = {
  668. DATA_PATH .. "/lspinstall/svelte/node_modules/.bin/svelteserver",
  669. "--stdio",
  670. },
  671. on_attach = common_on_attach,
  672. capabilities = common_capabilities,
  673. },
  674. },
  675. },
  676. swift = {
  677. formatter = {
  678. exe = "swiftformat",
  679. args = {},
  680. stdin = true,
  681. },
  682. lsp = {
  683. provider = "sourcekit",
  684. setup = {
  685. cmd = {
  686. "xcrun",
  687. "sourcekit-lsp",
  688. },
  689. on_attach = common_on_attach,
  690. capabilities = common_capabilities,
  691. },
  692. },
  693. },
  694. tailwindcss = {
  695. active = false,
  696. filetypes = {
  697. "html",
  698. "css",
  699. "scss",
  700. "javascript",
  701. "javascriptreact",
  702. "typescript",
  703. "typescriptreact",
  704. },
  705. },
  706. terraform = {
  707. formatter = {
  708. exe = "terraform",
  709. args = { "fmt" },
  710. stdin = false,
  711. },
  712. lsp = {
  713. provider = "terraformls",
  714. setup = {
  715. cmd = {
  716. DATA_PATH .. "/lspinstall/terraform/terraform-ls",
  717. "serve",
  718. },
  719. on_attach = common_on_attach,
  720. capabilities = common_capabilities,
  721. },
  722. },
  723. },
  724. typescript = {
  725. -- @usage can be prettier or eslint
  726. formatter = {
  727. exe = "prettier",
  728. args = {},
  729. },
  730. linters = {
  731. "eslint",
  732. },
  733. lsp = {
  734. provider = "tsserver",
  735. setup = {
  736. cmd = {
  737. -- TODO:
  738. DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
  739. "--stdio",
  740. },
  741. on_attach = require("lsp").common_on_attach,
  742. capabilities = require("lsp").common_capabilities(),
  743. },
  744. },
  745. },
  746. typescriptreact = {
  747. -- @usage can be prettier or eslint
  748. formatter = {
  749. exe = "prettier",
  750. args = {},
  751. },
  752. linters = {
  753. "eslint",
  754. },
  755. lsp = {
  756. provider = "tsserver",
  757. setup = {
  758. cmd = {
  759. -- TODO:
  760. DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
  761. "--stdio",
  762. },
  763. on_attach = require("lsp").common_on_attach,
  764. capabilities = require("lsp").common_capabilities(),
  765. },
  766. },
  767. },
  768. vim = {
  769. formatter = {
  770. exe = "",
  771. args = {},
  772. },
  773. linters = { "" },
  774. lsp = {
  775. provider = "vimls",
  776. setup = {
  777. cmd = {
  778. DATA_PATH .. "/lspinstall/vim/node_modules/.bin/vim-language-server",
  779. "--stdio",
  780. },
  781. on_attach = common_on_attach,
  782. capabilities = common_capabilities,
  783. },
  784. },
  785. },
  786. vue = {
  787. formatter = {
  788. exe = "prettier",
  789. args = {
  790. "--stdin-filepath",
  791. "${FILEPATH}",
  792. },
  793. stdin = true,
  794. },
  795. lsp = {
  796. provider = "vetur",
  797. setup = {
  798. cmd = {
  799. DATA_PATH .. "/lspinstall/vue/node_modules/.bin/vls",
  800. },
  801. on_attach = common_on_attach,
  802. capabilities = common_capabilities,
  803. },
  804. },
  805. },
  806. yaml = {
  807. formatter = {
  808. exe = "prettier",
  809. args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0), "--single-quote" },
  810. stdin = true,
  811. },
  812. lsp = {
  813. provider = "yamlls",
  814. setup = {
  815. cmd = {
  816. DATA_PATH .. "/lspinstall/yaml/node_modules/.bin/yaml-language-server",
  817. "--stdio",
  818. },
  819. on_attach = common_on_attach,
  820. capabilities = common_capabilities,
  821. },
  822. },
  823. },
  824. zig = {
  825. formatter = {
  826. exe = "zig",
  827. args = { "fmt" },
  828. stdin = false,
  829. },
  830. lsp = {
  831. provider = "zls",
  832. setup = {
  833. cmd = {
  834. "zls",
  835. },
  836. on_attach = common_on_attach,
  837. capabilities = common_capabilities,
  838. },
  839. },
  840. },
  841. }
  842. require("core.which-key").config()
  843. require "core.status_colors"
  844. require("core.gitsigns").config()
  845. require("core.compe").config()
  846. require("core.dashboard").config()
  847. require("core.dap").config()
  848. require("core.terminal").config()
  849. require("core.telescope").config()
  850. require("core.treesitter").config()
  851. require("core.nvimtree").config()