|
3 | 3 | -- |
4 | 4 | -- See the kickstart.nvim README for more information |
5 | 5 | return { |
6 | | - 'morhetz/gruvbox', |
7 | | - config = function() |
8 | | - vim.cmd.colorscheme 'gruvbox' |
9 | | - end, |
| 6 | + { |
| 7 | + 'morhetz/gruvbox', |
| 8 | + config = function() |
| 9 | + vim.cmd.colorscheme 'gruvbox' |
| 10 | + end, |
| 11 | + }, |
| 12 | + { |
| 13 | + 'pmizio/typescript-tools.nvim', |
| 14 | + dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' }, |
| 15 | + opts = {}, |
| 16 | + config = function() |
| 17 | + require('typescript-tools').setup { |
| 18 | + |
| 19 | + settings = { |
| 20 | + -- spawn additional tsserver instance to calculate diagnostics on it |
| 21 | + separate_diagnostic_server = true, |
| 22 | + -- "change"|"insert_leave" determine when the client asks the server about diagnostic |
| 23 | + publish_diagnostic_on = 'insert_leave', |
| 24 | + -- array of strings("fix_all"|"add_missing_imports"|"remove_unused"| |
| 25 | + -- "remove_unused_imports"|"organize_imports") -- or string "all" |
| 26 | + -- to include all supported code actions |
| 27 | + -- specify commands exposed as code_actions |
| 28 | + expose_as_code_action = {}, |
| 29 | + -- string|nil - specify a custom path to `tsserver.js` file, if this is nil or file under path |
| 30 | + -- not exists then standard path resolution strategy is applied |
| 31 | + tsserver_path = nil, |
| 32 | + -- specify a list of plugins to load by tsserver, e.g., for support `styled-components` |
| 33 | + -- (see ?? `styled-components` support section) |
| 34 | + tsserver_plugins = {}, |
| 35 | + -- this value is passed to: https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes |
| 36 | + -- memory limit in megabytes or "auto"(basically no limit) |
| 37 | + tsserver_max_memory = 'auto', |
| 38 | + -- described below |
| 39 | + tsserver_format_options = {}, |
| 40 | + tsserver_file_preferences = {}, |
| 41 | + -- locale of all tsserver messages, supported locales you can find here: |
| 42 | + -- https://github.com/microsoft/TypeScript/blob/3c221fc086be52b19801f6e8d82596d04607ede6/src/compiler/utilitiesPublic.ts#L620 |
| 43 | + tsserver_locale = 'en', |
| 44 | + -- mirror of VSCode's `typescript.suggest.completeFunctionCalls` |
| 45 | + complete_function_calls = false, |
| 46 | + include_completions_with_insert_text = true, |
| 47 | + -- CodeLens |
| 48 | + -- WARNING: Experimental feature also in VSCode, because it might hit performance of server. |
| 49 | + -- possible values: ("off"|"all"|"implementations_only"|"references_only") |
| 50 | + code_lens = 'off', |
| 51 | + -- by default code lenses are displayed on all referencable values and for some of you it can |
| 52 | + -- be too much this option reduce count of them by removing member references from lenses |
| 53 | + disable_member_code_lens = true, |
| 54 | + -- JSXCloseTag |
| 55 | + -- WARNING: it is disabled by default (maybe you configuration or distro already uses nvim-ts-autotag, |
| 56 | + -- that maybe have a conflict if enable this feature. ) |
| 57 | + jsx_close_tag = { |
| 58 | + enable = false, |
| 59 | + filetypes = { 'javascriptreact', 'typescriptreact' }, |
| 60 | + }, |
| 61 | + }, |
| 62 | + } |
| 63 | + end, |
| 64 | + }, |
10 | 65 | } |
0 commit comments