Giter Site home page Giter Site logo

vscode-q's Introduction

Jo Shinonome

Projects

vscode-k-pro

kdb+/q & k9 professional extension for vscode

vscode-q

kdb+/q extension for vscode

jkdb

A zero dependency javascript Node.js package to interface with kdb+/q (v2.6+).

vscode-q's People

Contributors

jshinonome avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vscode-q's Issues

Delay showing q Console output after executing query

There seems to be a half a second delay before displaying the result of any query, even to a local q server. For example, the query might take 5ms to execute but it takes much longer to show the result in the q Console. The low responsiveness masks the visual interpretation of the responsiveness of the query, which hurts development.

Do you know if this a VS Code limitation or something that can be fixed inside the extension?

I checked https://github.com/jshinonome/vscode-q/blob/v2.3.6/src/client/modules/query-console.ts#L27 but couldn't find any artificial delay.

Fails to initialize language server if no permission to 'stat' folder

Fails to initialize language server if no permission to 'stat' folder.

mainThreadExtensionService.ts:66 Error: Request initialize failed with message: EPERM: operation not permitted, stat 's:\afolder/hdb'
	at c:\dev\vscode_extensions\extensions\jshinonome.vscode-q-1.7.1\dist\q-ext.js:3:65923
	at c:\dev\vscode_extensions\extensions\jshinonome.vscode-q-1.7.1\dist\q-ext.js:3:66217
	at Immediate.<anonymous> (c:\dev\vscode_extensions\extensions\jshinonome.vscode-q-1.7.1\dist\q-ext.js:3:66576)
	at processImmediate (internal/timers.js:439:21)

<go to Definition (f12)> Unable to open <file>...

steps to reproduce:
create 2 q file:
fist.q
fun:{[a;b] a+b}
second .q
fun[1;2]
go to second.q -> f12 -> all will be ok
rename first.q -> first_renamed.q
go to second.q -> f12 -> Unable to open 'first.q': Unable to read file '........first.q'

Query Grid Cell Copy

Ability to copy a single cell or multiple rows would be great in query Grid view using ag-grid

Query view

I am using VS Code January 2021 (version 1.53) with vscode-q v2.1.1
I added some remote and local sever and created table, I can run query but where is "Query View" mentioned in document? It will be great if you could please mention or am I missing additional extension.

Documentation

  • shortcut F1
  • signature helps for build-in functions.

Add code formatting

A lot of devs write q code as one unformatted line.. sometimes it's quite hard to parse)).. will be good to have code formatting as in other popular languages like java,c,....

Timestamps changed to 1969.12.31D18:59:59.999 with timestamps with .999

When querying the timestamp field in table, if the timestamp value has .999 in it.

In the q console:

q)t2:2016.01.13D17:11:29.99900 2016.01.13D17:11:29.9900 2016.01.13D17:11:29

and in VS Code:

([] time: t2)

vscode-q-timestampissue

Also when you save the table to csv the timestamp value is stored as -1

This only appears to impact the query view tab for the table. The console view returns the timestamp correctly.

Feature Request: Ctrl+q enhancements

Would be good to have Ctrl+q automatically advance the cursor to the next line, so that I can execute line by line using only Ctrl+q, without having to move the cursor myself.

A stretch goal (but I think this may be more challenging) is to have the language server recognize the boundaries of an expression, which may exist across multiple lines, and have Ctrl+q execute the expression that the current line is a part of, and then move the cursor to the start of the next expression.

The query keeps running in vscode but it has already finished in kdb

When using the virtualization and run some query to show the table details, like "select from tb where date=.z.D-5", the query itself is finished in kdb, but the status still shows running in vscode side. In result, neither could I see the results of query, nor could I run other queries.

Is there a way to stop the running in vscode side? What I can do in this case is just close the vscode and restart a new one, which is quite annoying.

Thank you in advance if you can help on this issue!

Is it possible to disable server explorer?

Hey just started using this extension. Really helpful, thanks a lot for sharing.

Had one problem that seems to be takes very long time on initial connection to server to recursively build the server explorer table, code for that appears to be defined here:

const query = `{

Lazy fix would be if someway to have option to disable this server explorer.

Will take a closer look to see what part is taking so long and try and replicate.

Thanks

vscode-q client fails to gracefully reconnect after interruption (e.g. laptop sleep)

Prerequisite:

  • Server closed the connection but the extension is unaware yet, e.g. after resuming from sleep
  • User wants to execute a query

When the user resumes from sleep, the extension still thinks the q server is connected, and allows you to execute a query. Once doing so, it immediately says "Lost connection to..." but the query remains in executing state on the extension's side. Because of this, even after reconnecting, it says "Still executing last query" and the only solution is to restart VS Code.

Could this be improved so that the busy attribute

is cleared if the connection is closed/reopened? I believe that could fix it.

Additionally, the extension should attempt to gracefully reconnect to the server if the connection was lost to make this an even more pleasant developer experience.

Increase decimal digits for Query View

Hi, I think you need to add new tool for data visualization or modify Query View because 50% of data in Query View and console are different ... i understand that it's by design but not expected ....
I can use console but in 30% cases console is not really useful because i have a lot of columns…..

regarding Query View again ...
as an example I can't compare bid ,ask, price ....
t:([]bid:1.443 1.443 1.443; ask: 1.447 1.448 1.446)
image

Able to choose q server from keyboard

vscode-q is cool.
Would be good to be able to choose a q server from the server list via keyboard. Be able to stay completely in the keyboard without moving the mouse would be nice.

Configurable shortcut for "run selected line(s)"

Hello,

Thank you for creating this wonderful extension! I was wondering if you would consider adding a configurable shortcut for at least the "run selected line(s)" command:

Screen Shot 2021-03-15 at 1 27 58 AM

I used qStudio for a long time which uses CTRL+E (CMD+E on macOS), and there is another vscode extension https://github.com/real-xidaozu/vscode-kdb-q that follows this tradition. It would be helpful for any users who prefer to keep using their muscle memory.

If it is already possible to configure shortcuts for these, would you mind pointing me in the right direction to do that? :)

Also, two more related things:

  1. I think it might be helpful to clarify that it's actually "run selection" rather than "run selected line(s)" since you can query a part of a line with that command.
  2. Users of macOS generally use CMD in place of CTRL. This looks to conflict with some of the current shortcuts (like CTRL+Q), since CMD+Q will quit an application entirely on macOS! If users can eventually choose their own shortcuts they could fix that themselves, however I think it would be useful to choose default mappings that work well cross-platform.

Thanks again for your time.

Failed to find any source warning in every project

I get Failed to find any source files using the glob "**/src/**/*.q,**/qcode*/**/*.q". Some feature will not be available. warning every time I open different folders in vscode. Can this extension be silent on the projects that don't have q code?

Tip: you can set activation point to opening q-lang file instead of traversing entire project.

Can't add non-localhost server

It seems that the newest update which changed the server create UI has a regression.

No matter what address I put in the hostname field, it always ends up creating the entry against 127.0.0.1. For example, if I choose 192.168.1.1 as the hostname and 6000 as the port, it will create it as 127.0.0.1:6000 and the connection will fail.

When I go back to re-edit, it shows a blank hostname with "localhost" as default text. I tried re-entering the hostname and then using create/update, but after submitting the issue persists and upon re-checking, the hostsname field continues to be empty.

Screen Shot 2021-03-22 at 10 10 10 PM

Output tab autoscroll & query view location

Hi Jo,

Thanks again for the continuous help. I was wondering if it makes sense to you for the below features (let me know if I missed it and it's already there). Totally open to discussion and np at all if not feasible for this extension. :)

Bob

  1. Is this possible to make the output tab autoscrolled to the bottom, which is similar experience with the terminal tab? This way user won't need to scroll down to see the results.
  2. Do you think it's sensible and doable to have the query view located beneath the code editor e.g. being part of the tabs widget including output, terminal, ports and debug console? This way user can leverage the width of the screen better than having it on the right of code editor. This is especially useful when the table is wide. I thought about this from my experience with qstudio (http://www.timestored.com/qstudio/ see the picture under "query server").

Unable to connect to connect to q/kdb session on remote server

Hi Jo,

Thanks a lot for the great extension. I installed the 2.2.4 version (the latest version that is compatible with my VS Code ver 1.56.2 Windows PC at work), all features work fine (e.g. ssh to linux box, code highlighting, editing/saving files on the linux box, etc) except for connecting to q/kdb session launched on the same remote linux box.

I specified hostname/port/user/password in the dialogue to add server, and once I hit create, I got below error (actual contents in '[]' are omitted).

error accepting token gss major 589824 invalid token was supplied, gss minor 0 unknown error
gss error authenticating user
a connection failed with following information userhost`handle!([myusername];[myhost];[myhandle])

With another IDE kdbStudio, I verified that the host/port/username/password I put in are correct: if I set auth method to "username and password", I got exactly the same error as above. But if I set auth method to 'Kerberos', it connected to remote q session fine. So I was suspecting if it's the same auth method problem that caused the failure in connecting to q session with your extension.

Could you please kindly shed some light? And if it's indeed the auth method problem, would you be able to add Kerberos as an option for auth method, so user can not only specify host/port/username/password etc but also auth method ('username & pasword' or 'Kerberos')? Many thanks!

Bob

PS: one punch man rocks!

Alternative methods for sending queries

For example in a menu when right-clicking on a server or via toolbar button(s).

For comparison, KDB Studio has 3 different ways to choose what to send to the server using 2 different commands:

  • The selected text (even if it cuts a word in half, only the selected part is sent) – Ctrl+E with text selected
  • The whole content of the editor – Ctrl+E with no text selected
  • The current line, ignoring selection – Ctrl+Enter

All 3 have their uses, e.g. full text to load an entire script into an empty q process, selected text to send a multiline function, and single-line to execute simple statements as it’s easier to put the cursor just somewhere on the line than selecting the line from start to end.

Missing extension ?

I think your recent change for customized auth requires jshinonome.vscode-q to be published to the marketplace.

When I attempt a server connection:
Customized Auth Plug(jshinonome.vscode-q-auth) is not found or not activated yet

server list -> wrong connection

i guess you are using label as unique id in the server list instead of tag + label...
so steps to reproduce:
I have
TAG1 -> myLabel->localhost:1444
TAG2 -> myLabel->remote host:1444

i will always connect to same server
as workaround i can use different labels

Unable to fetch variables

Hello,

recently (maybe since 2 weeks ago?) I just found that I kept getting the error notification saying "Unable to fetch variables from [my q port number]". Besides that, querying and everything else seem working just fine. I'm wondering if this is a known issue or maybe I'm missing something?

I don't have any major changes in q (company managed) or vscode so far as I know.

Is there any further information that I can provide to better diagnose this problem?

Support for .quke files

Would be good to get syntax highlighting and ctrl+* functions to work with .quke files.

Stretch goal would be to integrate the test results into the gui somehow.

Query view is empty

t:([]a:1 2 3 4 5; b:a1a1a3a4`a4)
t -> click Ctrl+Q here -> Query view will be empty
image

Improve documentation

GIFs are not the best choice for presenting the functionality of the plugin in the readme. The best would be a series of screenshots, with (searchable) text in between that explains what is happening. But even an embedded video is better than a GIF because then you at least get to start/stop/rewind etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.