developer-roadmap icon indicating copy to clipboard operation
developer-roadmap copied to clipboard

[Suggestion] Blazor Roadmap

Open BrillianceRen opened this issue 3 years ago • 0 comments

How about a Roadmap that In-depth explains Blazor in simple terms?

BrillianceRen avatar Feb 24 '23 01:02 BrillianceRen

Not strongly opposed but the C defaults can be useful in plain text files and other files lacking better defaults. Could address that here by adding defaults for filetype=text at least.

What is cost of the current defaults?

justinmk avatar Mar 03 '23 15:03 justinmk

Could address that here by adding defaults for filetype=text at least.

LaTeX defaults, clearly :D

clason avatar Mar 03 '23 15:03 clason

What is cost of the current defaults?

There is not really a cost, but there is also not really any cost to removing the defaults and putting them in an ftplugin. The benefit is that it makes Nvim more coherent and consistent with the rule "filetype specific options go in filetype plugins".

the C defaults can be useful in plain text files and other files lacking better defaults

I am not sure what a good default value for these options would even be, since they are all language specific. I also cannot think of a case where the C default values would be useful outside of editing a C (or C++) file.

gpanders avatar Mar 03 '23 16:03 gpanders

There is not really a cost,

There is a cost, we should be aware of it and decide based on that. E.g. after this change gf arguably is less useful for no real benefit. In fact we might want to augment the default 'path' rather than shrink it.

I also cannot think of a case where the C default values would be useful outside of editing a C (or C++) file.

Paths for example can show up in comments in various files, like markdown docs.

justinmk avatar Mar 03 '23 16:03 justinmk

Paths for example can show up in comments in various files, like markdown docs.

Yes, but a full path still works with gf, as do relative paths. The only case in which having /usr/include in the default 'path' would be useful is if someone wanted to navigate to a C header file when the word under the cursor is just "stdio.h" (for example), but they are not already in a C source file.

And /usr/include is not even a valid path on macOS or Windows. So this is an extremely narrow use case.

I'm not going to push too hard for this if there's not a consensus that it's an easy choice. It's a low risk, low impact change, so not worth spending a lot of time on it.

gpanders avatar Mar 03 '23 18:03 gpanders

+1 from me; for me this falls pretty squarely under the "sane defaults" goal of Neovim (emphasis on "sane").

But low impact either way.

clason avatar Mar 03 '23 18:03 clason

I've just gotta say both include and define seem completely redundant and have little (or zero?) use outside of C/CPP, and even for those don't provide much value since they are unlikely to work for many projects.

path on the other hand seems quite generic and generally useful.

I think commentstring needs a non-empty default. Perhaps // %s.

lewis6991 avatar Mar 03 '23 21:03 lewis6991

default should be .,,, not empty, but yes C specific stuff like /usr/include can be removed and put in ftplugin

craigmac avatar Mar 09 '23 22:03 craigmac

default should be .,,, not empty

Indeed, and that is the value set in this PR.

gpanders avatar Mar 09 '23 22:03 gpanders

Any chance we can pick this back up? I think we need this for ts-aware commentstrings. At the moment parsers like comment pick up the default commentstring value. We need it to be '' so we can ignore it.

lewis6991 avatar Mar 31 '23 14:03 lewis6991

I am generally in favor of these changes (in particular to commentstring, for the reason @lewis6991 mentions above); my only concern is that this involves "forking" the C ftplugin, which so far we've diligently avoided ("vim runtime belongs to Vim").

Would it be possible to set these in a separate ftplugin/c.lua instead to make clear that these are Neovim-specific (and allow easier merging of runtime file updates)?

Also, tests would have to be adapted, especially a bunch of oldtests...

clason avatar Apr 01 '23 08:04 clason

It seems that these options need to be decided one by one.

zeertzjq avatar Apr 02 '23 11:04 zeertzjq

The current PR removes defaults from

  • commentstring (this is a necessary change to make filetype options -- and thus treesitter injection options -- work)
  • define (not useful outside of C/C++)
  • include (not useful outside of C/C++)
  • path (not useful outside of C/C++ on Unix)

All of these seem like clear improvements to me, but only the first is actually necessary. If this unblocks the PR for 0.9, I'm OK with separating out that change.

clason avatar Apr 02 '23 12:04 clason

#22862

zeertzjq avatar Apr 02 '23 12:04 zeertzjq

Rebased on master.

gpanders avatar Apr 03 '23 14:04 gpanders

@justinmk Please review changes to vim_diff

@zeertzjq Please review changes to oldtests

gpanders avatar Jun 05 '23 15:06 gpanders

Pushed a commit

zeertzjq avatar Jun 05 '23 15:06 zeertzjq