Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: LuaLS/lua-language-server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.6.0
Choose a base ref
...
head repository: LuaLS/lua-language-server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 988 changed files with 40,906 additions and 88,869 deletions.
192 changes: 113 additions & 79 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,90 +1,124 @@

# see https://github.com/CppCXY/EmmyLuaCodeStyle
[*.lua]
# [basic code reformat option]
# [basic]

# optional space/tab
indent_style = space
# if indent_style is space, this is valid
indent_size = 4
# if indent_style is tab, this is valid
tab_width = 4
# only support number
continuation_indent_size = 4
# if true, continuation_indent_size for local or assign statement is invalid
# however, if the expression list has cross row expression, it will not be aligned to the first expression
local_assign_continuation_align_to_first_expression = false
# function call expression's args will align to first arg
# however, if the args has cross row arg, it will not be aligned to the first arg
align_call_args = false
# if true, format like this "print( "123", 456 )"
keep_one_space_between_call_args_and_parentheses = false
# if true, all function define params will align to first param
align_function_define_params = true
# if true, format like this "local t = { 1, 2, 3 }"
keep_one_space_between_table_and_bracket = true
# if indent_style is tab, this option is invalid
align_table_field_to_first_field = false
# if true, ormat like this "local t <const> = 1"
keep_one_space_between_namedef_and_attribute = false
# continous line distance
max_continuous_line_distance = 1
# if true, iff any one of the consecutive rows meets the condition of aligning to the equal sign,
# the consecutive rows will be aligned to the equal sign
weak_alignment_rule = true
# see document for detail
continuous_assign_statement_align_to_equal_sign = true
# see document for detail
continuous_assign_table_field_align_to_equal_sign = true
# if true, the label loses its current indentation
label_no_indent = false
# if true, there will be no indentation in the do statement
do_statement_no_indent = false
# if true, the conditional expression of the if statement will not be a continuation line indent
if_condition_no_continuation_indent = false


# optional crlf/lf
end_of_line = auto
detect_end_of_line = true

# [line layout]
# The following configuration supports three expressions
# minLine:${n}
# keepLine
# KeepLine:${n}

keep_line_after_if_statement = minLine:0
keep_line_after_do_statement = minLine:0
keep_line_after_while_statement = minLine:0
keep_line_after_repeat_statement = minLine:0
keep_line_after_for_statement = minLine:0
keep_line_after_local_or_assign_statement = keepLine
keep_line_after_function_define_statement = keepLine:1

# [diagnostic]
# the following is code diagnostic options
enable_check_codestyle = true
# this mean utf8 length
# none/single/double
quote_style = none

continuation_indent = 4

# this mean utf8 length , if this is 'unset' then the line width is no longer checked
# this option decides when to chopdown the code
max_line_length = 120
# this will check text end with new line(format always end with new line)

#optional keep/never/always/smart
trailing_table_separator = keep

# keep/remove/remove_table_only/remove_string_only
call_arg_parentheses = keep

detect_end_of_line = false

# this will check text end with new line
insert_final_newline = true

# [name style check]
enable_name_style_check = true
# the following is name style check rule
# base option off/camel_case/snake_case/upper_snake_case/pascal_case/same(filename/first_param/'<const string>', snake_case/pascal_case/camel_case)
# all option can use '|' represent or
# for example:
# snake_case | upper_snake_case
# same(first_param, snake_case)
# same('m')
local_name_define_style = camel_case|upper_snake_case
function_param_name_style = camel_case
function_name_define_style = camel_case
local_function_name_define_style = camel_case
table_field_name_define_style = camel_case|pascal_case
global_variable_name_define_style = camel_case|upper_snake_case
module_name_define_style = camel_case
require_module_name_style = camel_case
class_name_define_style = camel_case
table_append_expression_no_space = true
if_condition_align_with_each_other = true
# [space]
space_around_table_field_list = true

space_before_attribute = true

space_before_function_open_parenthesis = false

space_before_function_call_open_parenthesis = false

space_before_closure_open_parenthesis = true

space_before_function_call_single_arg = true

space_before_open_square_bracket = false

space_inside_function_call_parentheses = false

space_inside_function_param_list_parentheses = false

space_inside_square_brackets = false

# like t[#t+1] = 1
space_around_table_append_operator = true

ignore_spaces_inside_function_call = false

space_before_inline_comment = 1

# [operator space]
space_around_math_operator = true

space_after_comma = true

space_after_comma_in_for_statement = true

space_around_concat_operator = true

# [align]

align_call_args = false

align_function_params = true

align_continuous_assign_statement = true

align_continuous_rect_table_field = true

align_if_branch = true

align_array_table = true

# [indent]

never_indent_before_if_condition = false

never_indent_comment_on_if_branch = false

# [line space]

# The following configuration supports four expressions
# keep
# fixed(n)
# min(n)
# max(n)
# for eg. min(2)

line_space_after_if_statement = keep

line_space_after_do_statement = keep

line_space_after_while_statement = keep

line_space_after_repeat_statement = keep

line_space_after_for_statement = keep

line_space_after_local_or_assign_statement = keep

line_space_after_function_statement = fixed(2)

line_space_after_expression_statement = keep

line_space_after_comment = keep

# [line break]
break_all_list_when_line_exceed = false

auto_collapse_lines = false

# [preference]
ignore_space_after_colon = true

remove_call_expression_list_finish_comma = false
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
custom: ["https://paypal.me/sumneko", "https://github.com/sumneko/lua-language-server/issues/484"]
custom: ["https://paypal.me/sumneko", "https://github.com/LuaLS/lua-language-server/issues/484"]
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@ body:
label: Log File
description: >
Please provide your log file. Refer to the wiki to find your log file:
https://github.com/sumneko/lua-language-server/wiki/FAQ#where-can-i-find-the-log-file
https://luals.github.io/wiki/faq#where-can-i-find-the-log-file
- type: markdown
attributes:
value: |
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Report LuaLS.github.io issues
url: https://github.com/LuaLS/LuaLS.github.io/issues
about: Please report issues regarding our website (and the documentation on it) in the website repository.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/doc-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Documentation Report
description: Report an issue with documentation in the lua-language-server.
labels:
- documentation
assignees:
- carsakiller
body:
- type: markdown
attributes:
value: >
For issues with our [website](https://luals.github.io) and its wiki,
please visit the [correct repository](https://github.com/LuaLS/LuaLS.github.io/issues).
- type: markdown
attributes:
value: >
**Please check for similar issues before continuing!**
- type: textarea
id: expected
attributes:
label: Issue Description
description: Please describe the documentation issue. Is something incorrect, missing or improveable?
validations:
required: true
- type: textarea
id: additional-notes
attributes:
label: Additional Notes
description: >
Please provide any additional notes, context,
and media you have.
- type: markdown
attributes:
value: |
Thank you very much for helping improve the language server! ❤️
17 changes: 17 additions & 0 deletions .github/scripts/check-changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -e

CHANGELOG_FILE="changelog.md"

git fetch origin $GITHUB_BASE_REF
git fetch

# Check if the changelog file was modified in the PR
if git diff --name-only origin/$GITHUB_BASE_REF..remotes/pull/$GITHUB_SOURCE_REF | grep -q $CHANGELOG_FILE; then
echo "Thank you for updating the changelog!"
exit 0
else
echo "Changelog has not been updated. Please update $CHANGELOG_FILE!"
exit 1
fi
75 changes: 58 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: build

permissions:
contents: write

on:
push:
branches:
- master
- 'v*.*.*'
tags:
- "*"
pull_request:
@@ -20,25 +24,59 @@ jobs:
fail-fast: false
matrix:
include:
- { os: ubuntu-18.04, target: linux, platform: linux-x64 }
- { os: ubuntu-18.04, target: linux, platform: linux-arm64 }
- { os: macos-11, target: darwin, platform: darwin-x64 }
- { os: macos-11, target: darwin, platform: darwin-arm64 }
- { os: ubuntu-22.04, target: linux, platform: linux-x64, container: 'alpine:latest', libc: musl }
- { os: ubuntu-22.04, target: linux, platform: linux-x64 }
- { os: ubuntu-22.04, target: linux, platform: linux-arm64 }
- { os: macos-latest, target: darwin, platform: darwin-x64 }
- { os: macos-latest, target: darwin, platform: darwin-arm64 }
- { os: windows-latest, target: windows, platform: win32-ia32 }
- { os: windows-latest, target: windows, platform: win32-x64 }
runs-on: ${{ matrix.os }}
container:
image: ${{ matrix.container }}
steps:
- name: Install aarch64-linux-gnu
if: ${{ matrix.platform == 'linux-arm64' }}
if: ${{ matrix.platform == 'linux-arm64' && matrix.libc != 'musl' }}
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- uses: actions/checkout@v2
- name: Prepare container for musl
if: ${{ matrix.target == 'linux' && matrix.libc == 'musl' }}
run: |
apk update
apk add git ninja bash build-base nodejs linux-headers
- name: Prepare for Linux
if: ${{ matrix.target == 'linux' && matrix.libc != 'musl' }}
run: |
sudo apt update
sudo apt install ninja-build
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actboy168/setup-luamake@master
- run: luamake -platform ${{ matrix.platform }}

- name: Build for Windows
if: ${{ matrix.target == 'windows' }}
run: .\make.bat ${{ matrix.platform }}

- name: Build for Linux
if: ${{ matrix.target == 'linux' }}
run: |
./make.sh ${{ matrix.platform }}
- name: Build for macOS
if: ${{ matrix.target == 'darwin' }}
run: |
brew install ninja
./make.sh ${{ matrix.platform }}
- name: Build for x64 glibc
if: ${{ matrix.platform == 'linux-x64' && matrix.libc != 'musl' }}
run: |
docker build -t ubuntu-18.04 .
docker run --rm -v $(pwd):$(pwd) -w $(pwd) ubuntu-18.04 bash -c './make.sh'
- name: Setting up workflow variables
id: vars
@@ -60,20 +98,23 @@ jobs:
# Package name w/ version
PKG_BASENAME="${{ env.PROJECT }}-${PKG_VERSION}-${{ matrix.platform }}"
if [[ "${{ matrix.libc }}" = musl ]]; then
PKG_BASENAME="${PKG_BASENAME}-${{matrix.libc}}"
fi
# Full name of the tarball asset
PKG_NAME="${PKG_BASENAME}.${PKG_SUFFIX}"
# Staging area for tarballs
PKG_STAGING="ci_staging/$PKG_BASENAME"
echo ::set-output name=PKG_VERSION::${PKG_VERSION}
echo ::set-output name=PKG_BASENAME::${PKG_BASENAME}
echo ::set-output name=PKG_NAME::${PKG_NAME}
echo ::set-output name=PKG_PATH::"${PKG_STAGING}/${PKG_NAME}"
echo ::set-output name=PKG_STAGING::${PKG_STAGING}
- uses: actions/upload-artifact@v2
echo PKG_VERSION=${PKG_VERSION} >> $GITHUB_OUTPUT
echo PKG_BASENAME=${PKG_BASENAME} >> $GITHUB_OUTPUT
echo PKG_NAME=${PKG_NAME} >> $GITHUB_OUTPUT
echo PKG_PATH="${PKG_STAGING}/${PKG_NAME}" >> $GITHUB_OUTPUT
echo PKG_STAGING=${PKG_STAGING} >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.vars.outputs.PKG_BASENAME }}
path: |
@@ -118,9 +159,9 @@ jobs:
PKG_SUBMOD_NAME="${{ env.PROJECT }}-${{ steps.vars.outputs.PKG_VERSION }}-submodules.zip"
PKG_SUBMOD_PATH="${STAGING}/$PKG_SUBMOD_NAME"
zip -r $PKG_SUBMOD_PATH ./ -x "*.git*" -x "*.vscode*" -x "build*" -x "${{ env.BIN_DIR }}*" -x "${STAGING}*"
zip -r $PKG_SUBMOD_PATH ./ -x "*.git*" -x "*.vscode*" -x "build*" -x "${{ env.BIN_DIR }}*" -x "${STAGING}*" -x "3rd/json.lua*" -x "log*" -x "ci_staging*"
echo ::set-output name=PKG_SUBMOD_PATH::${PKG_SUBMOD_PATH}
echo PKG_SUBMOD_PATH=${PKG_SUBMOD_PATH} >> $GITHUB_OUTPUT
- name: Publish release assets
uses: softprops/action-gh-release@v1
Loading