![]() ![]() get_filetype_command(), 1) Tipįor unknown reasons, leaving a comma in the trailing element in any json file causes an error when loading into lua, so you have to remove the trailing comma in the last item. Send command to term one require( "betterTerm "). These functions could be useful if you intend to create plugins around code_runner, currently only the file type and current project commands can be accessed respectively The correct way to use them is shown in the example and described above. Warning! : Avoid using all the parameters at the same time. ![]() It is possible to use variables exactly the same as we would in CRFiletype file_name: Filename relative to root path.Note: Don't forget to name your projects because if you don't do so code runner will fail as it uses the name for the buffer name Projects parameters It is only necessary to define command(You do not need to write navigate to the root of the project, because automatically the plugin is located in the root of the project). In this case, the file_name and command must be provided. Use a different command than the one set in CRFiletype or your config lua. In order to do that it is necessary to define file_name. Use the default command defined in the filetypes file (see :CRFiletypeor check your confi lua). There are 3 main ways to configure the execution of a project (found in the example.) Remember that if you don't want to use variables you can use vim filename-modifiers ExampleĪdd support to javascript and objective c:ĭescription = "Project with deno using other command ",Ĭommand = "make buid & cd buid/ &. end - finish the command (it is useful for commands that do not require final autocompletion)īelow is an example of an absolute path and how it behaves depending on the variable:Ībsolute path: /home/anyuser/current/file.py.dir - path of directory to file opened.fileNameWithoutExt - file without extension file opened.fileName - file name to curren file opened.file - file path to currend file opened.The available variables are the following: If you want to add some other language or some other command follow this structure "key": "commans" Variables It is important that you know that configuration is given priority in pure lua, but if you prefer to configure in json, do not add the options filetype and project, and configure over the options filetype_path and project_path (these are paths of the os where your file is json), then you have a configuration in pure lua: ![]() Project_path = " ", - No default path defined Rust = "cd $dir & rustc $fileName & $dir$fileNameWithoutExt ", Highlight group for floating window/border (see ':h winhl')įiletype_path = " ", - No default path definedĬ = "cd $dir & gcc $fileName -o $fileNameWithoutExt & $dir/$fileNameWithoutExt ",Ĭpp = "cd $dir & g++ $fileName -o $fileNameWithoutExt & $dir/$fileNameWithoutExt ", Key that close the code_runner floating window window size, this option is ignored if tab is true Position to open the terminal, this option is ignored if mode is tab Focus on runner window(only works on toggle, term and tab mode) choose default mode (valid term, tab, float, toggle, buf) Project: If you prefer to use lua instead of json files, you can add your settings by project here(type table) Project_path: Absolute path to json file config (default: "", use absolute paths)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |