Skip to content

Commit

Permalink
Merge pull request #142 from Genio-The-Haiku-IDE/feature/koder-languages
Browse files Browse the repository at this point in the history
Feature/koder languages
  • Loading branch information
jackburton79 authored Nov 9, 2023
2 parents ae357a0 + 0c46849 commit 3b42a80
Show file tree
Hide file tree
Showing 58 changed files with 4,154 additions and 474 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ SRCS += src/config/ConfigWindow.cpp
SRCS += src/config/GMessage.cpp
SRCS += src/helpers/ActionManager.cpp
SRCS += src/helpers/FSUtils.cpp
SRCS += src/helpers/GenioCommon.cpp
SRCS += src/helpers/GSettings.cpp
SRCS += src/helpers/Logger.cpp
SRCS += src/helpers/PathBox.cpp
Expand All @@ -57,6 +56,8 @@ SRCS += src/helpers/git/GitRepository.cpp
SRCS += src/helpers/tabview/TabContainerView.cpp
SRCS += src/helpers/tabview/TabManager.cpp
SRCS += src/helpers/tabview/TabView.cpp
SRCS += src/helpers/tabview/Languages.cpp
SRCS += src/helpers/tabview/Styler.cpp
SRCS += src/lsp-client/LSPEditorWrapper.cpp
SRCS += src/lsp-client/LSPProjectWrapper.cpp
SRCS += src/lsp-client/LSPPipeClient.cpp
Expand Down Expand Up @@ -95,6 +96,7 @@ LIBS += columnlistview tracker
LIBS += git2
LIBS += src/lexilla/bin/liblexilla.a
LIBS += src/scintilla/bin/libscintilla.a
LIBS += yaml-cpp

# LIBPATHS = $(shell findpaths -a $(platform) B_FIND_PATH_DEVELOP_LIB_DIRECTORY)
# LIBPATHS = /boot/home/config/non-packaged/lib
Expand Down
83 changes: 83 additions & 0 deletions data/languages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
text:
name: Text file
extensions: [ txt ]
awk:
name: AWK
extensions: [ awk ]
bash:
name: Bash
extensions: [ sh, bash, bsh, csh, ksh, configure ]
c:
name: C
extensions: [ c ]
cmake:
name: CMake
extensions: [ cmake, CMakeLists.txt, CMakeCache.txt ]
cpp:
name: C++
extensions: [ cc, cpp, cxx, h, hh, hpp, hxx, dox ]
css:
name: CSS
extensions: [ css ]
diff:
name: Diff
extensions: [ diff, patch, patchset ]
gdscript:
name: GDScript
extensions: [ gd ]
html:
name: HTML
extensions: [ html, htm, shtml, shtm, xhtml, xht, hta ]
jam:
name: Jam
extensions: [ Jamfile, Jamrules, Jambase ]
javascript:
name: JavaScript
extensions: [ js, jsm, json ]
lua:
name: Lua
extensions: [ lua ]
makefile:
name: Makefile
extensions: [ mk, mak, Makefile, Makefile.am, makefile ]
markdown:
name: Markdown
extensions: [ md, markdown ]
ocaml:
name: OCaml
extensions: [ ml, mli, sml, thy ]
perl:
name: Perl
extensions: [ pl, pm, pod ]
php:
name: PHP
extensions: [ php, php3, php4, php5, phps, phpt, phtml ]
python:
name: Python
extensions: [ py, pyw ]
rdef:
name: RDef
extensions: [ rdef ]
recipe:
name: Recipe
extensions: [ recipe ]
ruby:
name: Ruby
extensions: [ rb, rbw, rake, rjs, Rakefile ]
rust:
name: Rust
extensions: [ rs ]
yab:
name: YAB
extensions: [ yab ]
xml:
name: XML
extensions: [ xml, xaml, xsl, xslt, xsd, xul, kml, svg, mxml, xsml, wsdl,
xlf, xliff, xbl, sxbl, pimx, config, vsixmanifest, manifest,
proj, csproj, vbproj, fsproj, vcproj, vcxproj, nproj, pyproj,
javaproj, wixproj, filters, settings, testsettings, vsmdi,
ruleset, rules, targets, props, vsprops, propdesc, resx,
rdlc rdl swidtag gml gtt gpx ]
yaml:
name: YAML
extensions: [ yml, yaml ]
41 changes: 41 additions & 0 deletions data/languages/awk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# AWK
# adapted from SciTE
lexer: perl
keywords:
0: >
BEGIN END
if else while do for in break continue delete exit function return
print printf sprintf
system close getline next nextfile fflush
atan2 cos exp int log rand sin sqrt srand
asort asorti gensub sub gsub index length match split
strtonum substr tolower toupper
mktime strftime systime
and compl lshift or rshift xor
bindtextdomain dcgettext dcngettext
ARGC ARGIND ARGV BINMODE CONVFMT ENVIRON ERRNO FIELDWIDTHS
FILENAME FNR FS IGNORECASE LINT NF NR OFMT OFS ORS PROCINFO
RS RT RSTART RLENGTH SUBSEP TEXTDOMAIN
comments:
line: "#"
styles:
0: 32
1: 148
4: 104
5: 105
6: 106
7: 113
10: 32
17: 114
2: 101
8: 32
12: 152
13: 152
14: 103
15: 113
3: 32
19: 32
9: 109
20: 32
21: 113
18: 103
39 changes: 39 additions & 0 deletions data/languages/bash.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Bash
lexer: bash
properties:
fold: 1
fold.comment: 1
keywords:
0: >
alias ar asa awk banner basename bash bc bdiff break bunzip2 bzip2 cal
calendar case cat cc cd chmod cksum clear cmp col comm compress continue
cp cpio crypt csplit ctags cut date dc dd declare deroff dev df diff
diff3 dircmp dirname do done du echo ed egrep elif else env esac eval
ex exec exit expand export expr false fc fgrep fi file find fmt fold
for function functions getarch getconf getopt getopts grep gres hash
head help history iconv id if in integer jobs join kill local lc let
line ln logname look ls m4 mail mailx make man mkdir more mt mv newgrp
nl nm nohup ntps od pack paste patch pathchk pax pcat perl pg pr print
printf ps pwd read readonly red return rev rm rmdir sed select set
setarch sh shift size sleep sort spell split start stop strings strip
stty sum suspend sync tail tar tee test then time times touch tr trap
true tsort tty type typeset ulimit umask unalias uname uncompress
unexpand uniq unpack unset until uudecode uuencode vi vim vpax wait wc
whence which while who wpaste wstart xargs zcat
comments:
line: "#"
styles:
0: 32
1: 148
3: 104
4: 105
5: 106
6: 106
7: 110
8: 32
9: 152
2: 101
10: 152
11: 151
12: 113
13: 113
30 changes: 30 additions & 0 deletions data/languages/c.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# C
lexer: cpp
properties:
fold: 1
lexer.cpp.track.preprocessor: 0
styling.within.preprocessor: 1
keywords:
0: if else switch case default break goto return for while do continue typedef sizeof NULL
1: void struct union enum char short int long double float signed unsigned const static extern auto register volatile
comments:
line: //
block: [ "/*", "*/" ]
styles:
11: 32
10: 110
6: 106
7: 106
4: 104
5: 105
16: 105
1: 101
2: 101
3: 103
15: 103
17: 117
18: 117
19: 119
13: 113
14: 114
9: 109
23 changes: 23 additions & 0 deletions data/languages/cmake.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# CMake
lexer: cmake
keywords:
0: add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory build_command build_name cmake_minimum_required configure_file create_test_sourcelist else elseif enable_language enable_testing endforeach endif endmacro endwhile exec_program execute_process export_library_dependencies file find_file find_library find_package find_path find_program fltk_wrap_ui foreach get_cmake_property get_directory_property get_filename_component get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install install_files install_programs install_targets link_directories link_libraries list load_cache load_command macro make_directory mark_as_advanced math message option output_required_files project qt_wrap_cpp qt_wrap_ui remove remove_definitions separate_arguments set set_directory_properties set_source_files_properties set_target_properties set_tests_properties site_name source_group string subdir_depends subdirs target_link_libraries try_compile try_run use_mangled_mesa utility_source variable_requires vtk_make_instantiator vtk_wrap_java vtk_wrap_python vtk_wrap_tcl while write_file
1: ABSOLUTE ABSTRACT ADDITIONAL_MAKE_CLEAN_FILES ALL AND APPEND ARGS ASCII BEFORE CACHE CACHE_VARIABLES CLEAR COMMAND COMMANDS COMMAND_NAME COMMENT COMPARE COMPILE_FLAGS COPYONLY DEFINED DEFINE_SYMBOL DEPENDS DOC EQUAL ESCAPE_QUOTES EXCLUDE EXCLUDE_FROM_ALL EXISTS EXPORT_MACRO EXT EXTRA_INCLUDE FATAL_ERROR FILE FILES FORCE FUNCTION GENERATED GLOB GLOB_RECURSE GREATER GROUP_SIZE HEADER_FILE_ONLY HEADER_LOCATION IMMEDIATE INCLUDES INCLUDE_DIRECTORIES INCLUDE_INTERNALS INCLUDE_REGULAR_EXPRESSION LESS LINK_DIRECTORIES LINK_FLAGS LOCATION MACOSX_BUNDLE MACROS MAIN_DEPENDENCY MAKE_DIRECTORY MATCH MATCHALL MATCHES MODULE NAME NAME_WE NOT NOTEQUAL NO_SYSTEM_PATH OBJECT_DEPENDS OPTIONAL OR OUTPUT OUTPUT_VARIABLE PATH PATHS POST_BUILD POST_INSTALL_SCRIPT PREFIX PREORDER PRE_BUILD PRE_INSTALL_SCRIPT PRE_LINK PROGRAM PROGRAM_ARGS PROPERTIES QUIET RANGE READ REGEX REGULAR_EXPRESSION REPLACE REQUIRED RETURN_VALUE RUNTIME_DIRECTORY SEND_ERROR SHARED SOURCES STATIC STATUS STREQUAL STRGREATER STRLESS SUFFIX TARGET TOLOWER TOUPPER VAR VARIABLES VERSION WIN32 WRAP_EXCLUDE WRITE APPLE MINGW MSYS CYGWIN BORLAND WATCOM MSVC MSVC_IDE MSVC60 MSVC70 MSVC71 MSVC80 CMAKE_COMPILER_2005 OFF ON HAIKU
comments:
line: "#"
styles:
0: 32
1: 101
2: 106
3: 153
4: 154
5: 105
6: 152
7: 152
8: 113
9: 105
10: 105
11: 105
12: 117
13: 152
14: 104
Loading

0 comments on commit 3b42a80

Please sign in to comment.