Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ba1ccbb1b | ||
|
|
86b3f73daf | ||
|
|
ef8a44520d |
@@ -58,14 +58,25 @@ make test
|
||||
# or: lua src/main.lua --test
|
||||
```
|
||||
|
||||
### Mason Installation (Neovim)
|
||||
### Neovim + Mason (Recommended)
|
||||
|
||||
For Neovim users, install via [mason.nvim](https://github.com/mason-org/mason.nvim) using a custom registry. See the [`tia-lsp.nvim` README](https://gitea.l-tech.rs/lazar/tia-lsp.nvim) for full setup instructions.
|
||||
The recommended way is via [mason.nvim](https://github.com/mason-org/mason.nvim) using the
|
||||
[`tia-mason-registry`](https://gitea.l-tech.rs/lazar/tia-mason-registry). See the
|
||||
[`tia-lsp.nvim` README](https://gitea.l-tech.rs/lazar/tia-lsp.nvim) for full step-by-step instructions.
|
||||
|
||||
Quick summary:
|
||||
1. Add the `tia-mason-registry` as a lazy.nvim plugin
|
||||
2. Register it with mason: `registries = { "file:~/.local/share/nvim/lazy/tia-mason-registry", "github:mason-org/mason-registry" }`
|
||||
3. `:MasonInstall tia-lsp`
|
||||
### Manual Setup
|
||||
|
||||
```bash
|
||||
# 1. Clone this repository
|
||||
git clone --depth 1 https://gitea.l-tech.rs/lazar/tia-lsp.git ~/tia-lsp
|
||||
|
||||
# 2. Compile the tree-sitter parser
|
||||
cc -fPIC -I ~/tia-lsp/src/tree_sitter -c ~/tia-lsp/src/parser.c -o ~/tia-lsp/parser.o
|
||||
cc -shared ~/tia-lsp/parser.o -o ~/tia-lsp/parser.so
|
||||
|
||||
# 3. Start the server (or configure your editor to run this)
|
||||
lua ~/tia-lsp/src/main.lua
|
||||
```
|
||||
|
||||
## External UDT Support
|
||||
|
||||
|
||||
@@ -106,6 +106,9 @@ function M.validate_diagnostics(content, workspace_types, root_dir)
|
||||
ExternalWRITABLE = true, -- case variant
|
||||
ExternalVISIBLE = true,
|
||||
ExternalACCESSIBLE = true,
|
||||
EXTERNALWRITABLE = true, -- all-caps VCI export variant
|
||||
EXTERNALVISIBLE = true, -- all-caps VCI export variant
|
||||
EXTERNALACCESSIBLE = true,-- all-caps VCI export variant
|
||||
S7_SetPoint = true,
|
||||
S7_Optimized_Access = true,
|
||||
}
|
||||
@@ -215,8 +218,13 @@ function M.validate_diagnostics(content, workspace_types, root_dir)
|
||||
if type_part:match("%s+OF%s+") then
|
||||
base_type = type_part:match('.*%s+OF%s+"([^"]+)"') or type_part:match(".*%s+OF%s+([%w_]+)")
|
||||
end
|
||||
|
||||
local is_array_keyword = base_type and base_type:upper() == "ARRAY"
|
||||
and type_part:match("^[Aa][Rr][Rr][Aa][Yy]%[")
|
||||
|
||||
local upper_type = base_type and base_type:upper() or nil
|
||||
if base_type and base_type ~= "" and
|
||||
not is_array_keyword and
|
||||
not all_types[base_type] and
|
||||
not builtin.is_known_data_type(upper_type) and
|
||||
not builtin.is_known_type_or_instruction(upper_type) then
|
||||
|
||||
Reference in New Issue
Block a user