-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Expand Neovim configuration scripts
- Loading branch information
1 parent
dc43d9a
commit d5b341e
Showing
18 changed files
with
121 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
-- Define hlasm FileType to Neovim | ||
vim.filetype.add({ | ||
extension = { | ||
hlasm = 'hlasm' | ||
}, | ||
pattern = { | ||
['.*/[Aa][Ss][Mm][Pp][Gg][Mm]/[^/]*'] = 'hlasm', | ||
['.*/[Aa][Ss][Mm][Mm][Aa][Cc]/[^/]*'] = 'hlasm', | ||
['.*%.asm'] = 'hlasm', | ||
['.*%.asmmac'] = 'hlasm', | ||
['.*%.asmpgm'] = 'hlasm', | ||
['.*%.hlasm'] = 'hlasm', | ||
['.*'] = { | ||
priority = -math.huge, | ||
function(path, bufnr) | ||
local content = vim.api.nvim_buf_get_lines(bufnr, 0, 1000, false) | ||
for i = 1, #content do | ||
m, e = string.match(content[i], '^[ ]+[Mm][Aa][Cc][Rr][Oo] ') | ||
if m ~= nil then | ||
return 'hlasm' | ||
end | ||
m, e = string.match(content[i], '^[ ]+[Mm][Aa][Cc][Rr][Oo]$') | ||
if m ~= nil then | ||
return 'hlasm' | ||
end | ||
c, e = string.match(content[i], '^[.]?*') | ||
if c == nil then | ||
break | ||
end | ||
end | ||
end | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
local util = require 'lspconfig.util' | ||
|
||
return { | ||
default_config = { | ||
cmd = { 'hlasm_language_server' }, | ||
filetypes = { 'hlasm' }, | ||
root_dir = util.root_pattern '.hlasmplugin', | ||
single_file_support = true, | ||
}, | ||
docs = { | ||
description = [[ | ||
`hlasm_language_server` is a language server for the High Level Assembler language used on IBM SystemZ mainframes. | ||
To learn how to configure the HLASM language server, see the [HLASM Language Support documentation](https://github.com/eclipse-che4z/che-che4z-lsp-for-hlasm). | ||
]], | ||
default_config = { | ||
root_dir = [[root_pattern(".hlasmplugin")]], | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
MACA | ||
MACB | ||
MACC | ||
MACA | ||
MACB | ||
MACC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.