Git Product home page Git Product logo

vscode-fortran's People

Contributors

gimly avatar

Stargazers

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

Watchers

 avatar  avatar

vscode-fortran's Issues

No Subroutine or Function symbols

Subroutine or function symbols that would make it easy to access parts of a file with

ctrl+p @<functionName>

would be very useful. I would happily help in trying to add this - I just do not know where to start!

mis-identification of comment text as string

Using v0.1.0, comments following a "!" are interpreted as strings if they contain the "'" character:

C Now it's time for the background vectors
C      Call FillFB(FB,muB)

      CL=0.9D0                    ! 90% Confidence level let's go
      If=1                      ! fmin = 0.

On the third line, the characters "s go" will be colored like a string. String coloration won't stop until another line contains the "'" character.

Automatic creation of mod files

Can you please add a setting to deactivate to automatic compiling of .mod files? This feature is convenient when working on a very small project, but when working with build systems or larger projects the automatic creation of .mod files bloats source code directories.

Adding the option to turn this off would be incredibly useful.

Exclamation mark comment support in fixed format mode

Using Punchcard mode, Intel Fortran and gfortran support the exclamation mark to put inline comments at the end of a line. I was able to enable this functionality by adding the following pattern in fortran.tmLanguage:

	<dict>
		<key>begin</key>
		<string>(^[ \t]+)?(?=!-)</string>
		<key>beginCaptures</key>
		<dict>
			<key>1</key>
			<dict>
				<key>name</key>
				<string>punctuation.whitespace.comment.leading.ruby</string>
			</dict>
		</dict>
		<key>end</key>
		<string>(?!\G)</string>
		<key>patterns</key>
		<array>
			<dict>
				<key>begin</key>
				<string>!-</string>
				<key>beginCaptures</key>
				<dict>
					<key>0</key>
					<dict>
						<key>name</key>
						<string>punctuation.definition.comment.fortran</string>
					</dict>
				</dict>
				<key>end</key>
				<string>\n</string>
				<key>name</key>
				<string>comment.line.exclamation.mark.fortran.modern</string>
				<key>patterns</key>
				<array>
					<dict>
						<key>match</key>
						<string>\\\s*\n</string>
					</dict>
				</array>
			</dict>
		</array>
	</dict>

The pattern is directly taken from modern.tmLanguage.

Basic auto-indent support

Hi : )

As you surely know, VSCode just implemented an auto-indent feature. I tried to create a pull request, but since the old one is still open this gets a bit messy. So, I propose here is a very basic suggestion to append to the file "modern.configuration.json":

	"indentationRules": {
		"increaseIndentPattern": "^\\s*((module|contains|function|subroutine|begin|else|elsif|do|for|case|select case|type)|(if\\b.*\\bthen))\\b",
		"decreaseIndentPattern": "^\\s*(contains|end|else|elseif|endif|case)\\b"
	}

Note that unfortunately VSCode does not seem to correct indentation within pasted blocks, so you have to write your own lines to test the feature (after setting editor.autoIndent to true)

I use Fortran and regexes very scarcely, so my proposition will probably have to be enhanced.

idea: add code-debug as a dependency for debugging

code-debug already has fortran/gdb support, and it may be possible to add that as a dependency to allow specifications of launch configurations and/or other things. At the very least, a recommendation should appear on the description page of this plugin.

Highlighting for type declaration

Hi,

The highlighting support for type declaration needs to be improved.

For example,

type  A
real :: b
end type A

displays correctly, but

type ::  A
real :: b
end type A

doesn't.

Unable to comment using ctrl+/ shotcut for vscode version 1.0.0

Hi, I unable to use the ctrl+/ shortcut command my FORTRAN (.f90) codes. it return error and as below

Unexpected exception while executing command.

Im currently using vscode version 1.0.0, Red Hat Enterprise Linux Workstation release 7.2 (Maipo). Can you reproduce the error at your side? thanks you.

Amirul

Incorrect highlighting of some keywords

There is some difference in syntax highlighting when initializing a variable with an intrinsic data type and a variable with a user-defined data type:
image
And this applies not only to the word "allocatable", but also, in my opinion, all other words that are in this dictionary (file modern.tmLanguage)

<dict> 
	<key>match</key>
	<string>\b(?i:(optional|recursive|pointer|allocatable|target|private|public))\b</string>
	<key>name</key>
	<string>storage.modifier.fortran.modern</string>
</dict>

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.