@yaegassy/coc-ty 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +7 -20
  2. package/package.json +25 -1
package/lib/index.js CHANGED
@@ -193,7 +193,7 @@ var require_lib = __commonJS({
193
193
  const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "";
194
194
  return prefix + join(pathPart, cmd);
195
195
  };
196
- var which3 = async (cmd, opt = {}) => {
196
+ var which2 = async (cmd, opt = {}) => {
197
197
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
198
198
  const found = [];
199
199
  for (const envPart of pathEnv) {
@@ -241,8 +241,8 @@ var require_lib = __commonJS({
241
241
  }
242
242
  throw getNotFoundError(cmd);
243
243
  };
244
- module2.exports = which3;
245
- which3.sync = whichSync;
244
+ module2.exports = which2;
245
+ which2.sync = whichSync;
246
246
  }
247
247
  });
248
248
 
@@ -261,7 +261,6 @@ var import_coc = require("coc.nvim");
261
261
  var SERVER_SUBCOMMAND = "server";
262
262
 
263
263
  // src/client.ts
264
- var import_which = __toESM(require_lib());
265
264
  function createServerClient(command) {
266
265
  const newEnv = { ...process.env };
267
266
  const args = [SERVER_SUBCOMMAND];
@@ -281,25 +280,13 @@ function createServerClient(command) {
281
280
  function convertFromWorkspaceConfigToInitializationOptions() {
282
281
  const settings = import_coc.workspace.getConfiguration("ty");
283
282
  const initializationOptions = {
284
- settings: {
285
- path: settings.get("path"),
286
- interpreter: settings.get("interpreter"),
287
- importStrategy: settings.get("importStrategy") ?? "fromEnvironment",
288
- diagnosticMode: settings.get("diagnosticMode") ?? "openFilesOnly",
289
- logLevel: settings.get("logLevel"),
290
- logFile: settings.get("logFile")
291
- }
283
+ logLevel: settings.get("logLevel"),
284
+ logFile: settings.get("logFile")
292
285
  };
293
286
  return initializationOptions;
294
287
  }
295
288
  function getInitializationOptions() {
296
289
  const initializationOptions = convertFromWorkspaceConfigToInitializationOptions();
297
- if (import_coc.workspace.getConfiguration("ty").get("useDetectTyCommand", true)) {
298
- const envTyCommandPath = import_which.default.sync("ty", { nothrow: true });
299
- if (envTyCommandPath) {
300
- initializationOptions.settings.path = [envTyCommandPath];
301
- }
302
- }
303
290
  return initializationOptions;
304
291
  }
305
292
  function getLanguageClientDisabledFeatures() {
@@ -359,11 +346,11 @@ async function register2(context, client2) {
359
346
 
360
347
  // src/tool.ts
361
348
  var import_coc4 = require("coc.nvim");
362
- var import_which2 = __toESM(require_lib());
349
+ var import_which = __toESM(require_lib());
363
350
  async function getTyBinaryPath() {
364
351
  let tyBinaryPath = import_coc4.workspace.getConfiguration("ty").get("binaryPath", "");
365
352
  if (!tyBinaryPath) {
366
- tyBinaryPath = import_which2.default.sync("ty", { nothrow: true }) || "";
353
+ tyBinaryPath = import_which.default.sync("ty", { nothrow: true }) || "";
367
354
  }
368
355
  return tyBinaryPath;
369
356
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaegassy/coc-ty",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "coc.nvim extension with support for the ty type checker and language server.",
5
5
  "author": "yaegassy <yosstools@gmail.com>",
6
6
  "license": "MIT",
@@ -133,6 +133,18 @@
133
133
  "scope": "resource",
134
134
  "type": "string"
135
135
  },
136
+ "ty.experimental.rename": {
137
+ "default": false,
138
+ "markdownDescription": "Enable experimental support for renaming symbols in ty.",
139
+ "scope": "window",
140
+ "type": "boolean"
141
+ },
142
+ "ty.experimental.autoImport": {
143
+ "default": false,
144
+ "markdownDescription": "Enable experimental support for auto-import code completions in ty.",
145
+ "scope": "window",
146
+ "type": "boolean"
147
+ },
136
148
  "ty.importStrategy": {
137
149
  "default": "fromEnvironment",
138
150
  "markdownDescription": "Strategy for loading the `ty` executable. `fromEnvironment` picks up ty from the environment, falling back to the bundled version if needed. `useBundled` uses the version bundled with the extension.",
@@ -147,6 +159,18 @@
147
159
  "scope": "window",
148
160
  "type": "string"
149
161
  },
162
+ "ty.inlayHints.variableTypes": {
163
+ "default": true,
164
+ "markdownDescription": "Whether to enable inlay hints for variable types.",
165
+ "scope": "window",
166
+ "type": "boolean"
167
+ },
168
+ "ty.inlayHints.callArgumentNames": {
169
+ "default": true,
170
+ "markdownDescription": "Whether to enable inlay hints for call argument names.",
171
+ "scope": "window",
172
+ "type": "boolean"
173
+ },
150
174
  "ty.interpreter": {
151
175
  "default": [],
152
176
  "markdownDescription": "Path to a Python interpreter to use to find the `ty` executable.",