Open createchange opened 9 months ago
Hi! Sorry to hear you've been having issues using the package. I think I can possibly see where the error is occurring, would you able to build from master to check a fix I've pushed?:
pipx install git+https://github.com/laurencewarne/cfn-lsp-extra.git@$(git ls-remote git@github.com:laurencewarne/cfn-lsp-extra.git | head -1 | cut -f1) --force
If not, could you provide a stack trace/log and python version?
Thanks!
That works better. I get autocompletion and linting, though snippets seem to function a bit worse than I am seeing in the video on the README. For example, when I follow what is on the video and implement a new VPC, get a new Properties
block, but no auto-fill for the CIDR property.
On a side note, in the event it is helpful for anyone else, two more changes are required:
---
at the top of them. EXAMPLE. I updated the filetype parser to check for the Template version on line 2: local line2 = vim.filetype.getlines(bufnr, 2)
if vim.filetype.matchregex(line1, [[^AWSTemplateFormatVersion]] ) or
vim.filetype.matchregex(line2, [[^AWSTemplateFormatVersion]] ) or <-------------
vim.filetype.matchregex(line1, [[AWS::Serverless-2016-10-31]] ) then
return 'yaml.cloudformation'
vim.treesitter.language.register("yaml", "yaml.cloudformation")
That works better. I get autocompletion and linting, though snippets seem to function a bit worse than I am seeing in the video on the README. For example, when I follow what is on the video and implement a new VPC, get a new Properties block, but no auto-fill for the CIDR property.
I think it may be the video is out of date, currently the CIDR required
property is marked as Conditional
rather than yes
which I'm guessing was the case when the video was made (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc.html#cfn-ec2-vpc-cidrblock) - only required = yes is included in snippets. Does snippet expansion for something like AWS::EC2::VPCGatewayAttachment
work (here VpcId
has required: yes
)?
On a side note, in the event it is helpful for anyone else, two more changes are required:
That looks super helpful, would you be willing to put together a PR to update this? :slightly_smiling_face: (I'm somewhat of a neovim noob!)
FYI I cut a new release for the configuration error, so that should be generally available now :slightly_smiling_face:
Hi again, that makes perfect sense. I’ll check it out and report back! I’m also a bit of a neovim noob, but I can certainly provide an MR and others can improve it if they see the need to.
Hi there,
I followed the example in the README for configuring this with lspconfig, and received the following errors:
The logs are more verbose than this, and I can provide them if the above doesn't tell the story.
I see
upper
is used incfn_lsp_extra/config/user_configuration.py
, but need to get back to the task at hand so don't have time to go down a rabbit hole.Hoping for a fix so that I can make use of your tool. Been on the lookout for something that will provide more than
yamlls
has been!