It is currently Fri Jul 19, 2019 11:36 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Sun Dec 09, 2018 1:47 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Mar 02, 2004 1:20 pm
Posts: 1009
Location: Amphibios 9
eddy wrote:
I published the Purebasic extension for VS Code. :D

Congratulations!

Install count + 1 :D

_________________
Can't decide if i need a hug, an XXL coffee, 6 shots of vodka or 2 weeks of sleep.


Top
 Profile  
Reply with quote  
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Sun Dec 09, 2018 3:44 pm 
Offline
User
User
User avatar

Joined: Thu Aug 09, 2007 11:26 am
Posts: 14
Location: Germany
eddy wrote:
I published the Purebasic extension for VS Code. :D

I just installed it, too. Thanks for your great work!

I'm looking forward to using vscode as my PB IDE instead of the official one once the most important features like auto completion are fully implemented.

I just have one minor issue: Is the indention hard coded to "Tab Size: 3"? Because I can't find any settings for that. I used spaces instead of tabs in other languages and currently have the PB IDE configured to use 2 spaces for indention. How to configure vscode to use (2) spaces instead of tabs without having to configure that per file?

_________________
ImageImageImageImage


Top
 Profile  
Reply with quote  
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Sun Dec 09, 2018 4:06 pm 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1477
Location: Nantes
How to change Tab size
  • Press F1
  • Enter "settings"
  • Select Open Settings
  • Enter "tab size"
This will change Tab Size global setting.

Image

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Last edited by eddy on Sun Dec 09, 2018 4:29 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Sun Dec 09, 2018 4:10 pm 
Offline
User
User
User avatar

Joined: Thu Aug 09, 2007 11:26 am
Posts: 14
Location: Germany
eddy wrote:
How to change Tab size
  • Press F1
  • Enter "settings"
  • Select Open Settings
  • Enter "tab size"


I know that. I've already changed tabs to spaces for vscode and it's working fine for other files. But once I open a file containing PB code, the tab size is set to 3 for that file. I have to manually change it per file every time.

_________________
ImageImageImageImage


Top
 Profile  
Reply with quote  
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Sun Dec 09, 2018 4:18 pm 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1477
Location: Nantes
Programie wrote:
eddy wrote:
How to change Tab size
  • Press F1
  • Enter "settings"
  • Select Open Settings
  • Enter "tab size"


I know that. I've already changed tabs to spaces for vscode and it's working fine for other files. But once I open a file containing PB code, the tab size is set to 3 for that file. I have to manually change it per file every time.


I declared some custom parameters for Purebasic. You can change PureBasic Tab Size setting as follows :

Image

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Top
 Profile  
Reply with quote  
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Sun Dec 09, 2018 4:32 pm 
Offline
User
User
User avatar

Joined: Thu Aug 09, 2007 11:26 am
Posts: 14
Location: Germany
Oh yes, I just found them, too. Weird, there is not category "PureBasic", just "PureBasic configuration" bellow "Extensions" which only allows me to change a few other settings. Maybe that's caused because the name is surrounded by brackets? It's named "[purebasic]" instead of "purebasic".

_________________
ImageImageImageImage


Top
 Profile  
Reply with quote  
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Sun Dec 09, 2018 4:37 pm 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1477
Location: Nantes
In this case, I wonder if it's a good idea to have PureBasic Tab Size setting ?
:?

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Top
 Profile  
Reply with quote  
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Tue Jan 08, 2019 11:13 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 30, 2013 4:39 pm
Posts: 426
Do you think there is a way to install it in Visual Studio Code on OSX?


Top
 Profile  
Reply with quote  
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Wed Jan 09, 2019 10:21 am 
Offline
New User
New User
User avatar

Joined: Tue Apr 10, 2018 8:18 am
Posts: 3
Location: Essen
Ty for the great work,

i just have one question, how do i compile/run/debug in visual studio code or am i only able to edit the code in vsc and compile it in purebasic itself ?

greetings Fabian


Top
 Profile  
Reply with quote  
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Wed Jan 09, 2019 11:55 am 
Offline
Enthusiast
Enthusiast

Joined: Tue Jul 26, 2005 12:02 pm
Posts: 210
Location: Lieusaint (77), France
Hi all,

Is it possible to configure inside VS Code to be able to call PB Compiler directly from Visual Code ?

_________________
Purebasic 5.70 64 bits - Windows 10 Pro 64 bits 1903


Top
 Profile  
Reply with quote  
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Wed Jan 09, 2019 12:53 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 22, 2003 7:43 pm
Posts: 391
Location: Germany, Saarbrücken
I am always using real tabs instead of spaces, is this also possible? I have to check out your extension tomorrow.

_________________
Electronics, Crazy & Interesting Stuff, all that with text, image and sound? Click here!

The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.


Top
 Profile  
Reply with quote  
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Wed Jan 09, 2019 7:11 pm 
Offline
User
User

Joined: Sat Jul 07, 2018 6:50 pm
Posts: 11
I like VSCode, for cpp and c# it's the best choice but with PB syntax I expected to see usual code styling (bold\highlighted keywords similar to PB IDE).


Top
 Profile  
Reply with quote  
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Wed Jan 09, 2019 7:28 pm 
Offline
User
User
User avatar

Joined: Thu Aug 09, 2007 11:26 am
Posts: 14
Location: Germany
GG wrote:
Is it possible to configure inside VS Code to be able to call PB Compiler directly from Visual Code ?


I'm using Tasks of vscode for that.

tasks.json of one of my projects (stored in .vscode/tasks.json inside the project folder):

Code:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Compile (test)",
            "type": "shell",
            "command": "${PUREBASIC_HOME}/compilers/pbcompiler --executable src/purebasic_compilation0.out --debugger --constant PB_Editor_CreateExecutable=0 src/gui.pb",
            "group": {
                "kind": "test"
            }
        },
        {
            "label": "Compile (build)",
            "type": "shell",
            "command": "${PUREBASIC_HOME}/compilers/pbcompiler --executable keyboard-mapper --constant PB_Editor_CreateExecutable=1 src/gui.pb",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        },
        {
            "label": "Run",
            "type": "shell",
            "command": "src/purebasic_compilation0.out",
            "dependsOn": [
                "Compile (test)"
            ],
            "group": {
                "kind": "test",
                "isDefault": true
            }
        }
    ]
}

_________________
ImageImageImageImage


Top
 Profile  
Reply with quote  
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Thu Jan 10, 2019 12:05 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Jul 26, 2005 12:02 pm
Posts: 210
Location: Lieusaint (77), France
Thanks a lot Programie !
Adapted for my needs under Windows from your example; it works well :

Code:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Compile (test)",
            "type": "shell",
            "command": "d:\\Applications\\PureBasic\\compilers\\pbcompiler /exe gencalend.exe /debugger /constant PB_Editor_CreateExecutable=0 /constant PB_Editor_CompileCount=1 gencalend.pb",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        },
        {
            "label": "Compile (build)",
            "type": "shell",
            "command": "d:\\Applications\\PureBasic\\compilers\\pbcompiler /exe gencalend.exe /constant PB_Editor_CreateExecutable=1 /constant PB_Editor_CompileCount=1 gencalend.pb",
            "group": "build"
        },
        {
            "label": "Run",
            "type": "shell",
            "command": "gencalend.exe",
            "dependsOn": [
                "Compile (test)"
            ],
            "group": {
                "kind": "test",
                "isDefault": true
            }
        }
    ]
}

_________________
Purebasic 5.70 64 bits - Windows 10 Pro 64 bits 1903


Top
 Profile  
Reply with quote  
 Post subject: Re: PB language support for Visual Studio Code
PostPosted: Wed Feb 13, 2019 10:44 am 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1477
Location: Nantes
Hi,

Thanks GG and Programie, I'll use your code to add "Create PB project" command :D

I've done no progress for my other tasks ... lack of time or motivation :oops:

I'm searching an example coded in typescript :
- to implement autocompletion
- to retrieve PB keywords by using a compiler command line

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye