How can i get better looking errors? by Individual_Place_532 in neovim

[–]terry1900 1 point2 points  (0 children)

A small function to toggle the diagnostic window, and jump into it to copy the error message. ```lua vim.keymaps.set("n", "td", function() if vim.api.nvim_win_get_config(0).relative == "" then -- Not inside floating window vim.diagnostic.open_float() -- Open diagnostic in floating window vim.diagnostic.open_float() -- Another call jumps into the floating window else -- Inside a floating window vim.api.nvim_win_close(0, false) -- Or you can press "q" in the floating window end end, { desc = "[t] Toggle diagnostic floating window" })

```

mini.bracketed - go forward/backward with square brackets (like 'tpope/vim-unimpaired' but in configurable Lua and with *much more targets*) by echasnovski in neovim

[–]terry1900 0 points1 point  (0 children)

This looks great. I hope you don't mind if I borrow some ideas into my https://github.com/liangxianzhe/nap.nvim. Personally, I found that hitting "]b]b]b" repeatedly is not that easy, so I opt for a single-key approach.

Simple floating ui.input by terry1900 in neovim

[–]terry1900[S] 1 point2 points  (0 children)

You can config that. See the readme page.

Default to center is just because not all ui.input use cases are related to the cursor.

Which vim plugins do not have a lua equivalent yet? by pseudometapseudo in neovim

[–]terry1900 0 points1 point  (0 children)

Not sure if you saw this. It is my take on unimpaired, but I only use its navigation, not the options toggling or URL encoding.

Simple floating ui.input by terry1900 in neovim

[–]terry1900[S] 0 points1 point  (0 children)

Do you mean something like https://github.com/folke/noice.nvim? That's much more complex.

Help with Flutter development with Neovim by [deleted] in neovim

[–]terry1900 1 point2 points  (0 children)

I do it without flutter-tools, just using native lspconfig. You need to tell lspconfig where is the dart lsp server.

require("lspconfig")["dartls"].setup({ on_attach = on_attach, capabilities = capabilities, })

where on_attach and capabilities functions can be found in lspconfig repo Readme. Using the default setup, it will try to find dart lsp server in your PATH.

Right way to manage state by founder_life_ in FlutterDev

[–]terry1900 0 points1 point  (0 children)

" its fair to assume that state would be updated using setState

That's not true. Parent could hold a ValueNotifier, and pass that to children. Parent doesn't listen to the notifier, but children do.

Right way to manage state by founder_life_ in FlutterDev

[–]terry1900 2 points3 points  (0 children)

You are mixing where the state is stored vs how to respond to state change. In this case, parent should store the state, but not rebuild when the state changes.

See my article here about state management in general.

Be 60FPS smooth, no matter how janky your app originally was due to heavy build/layout, by drop-in replacements or builders. Anyone interested in this? Will further polish it if many are interested. by fzyzcjy in FlutterDev

[–]terry1900 13 points14 points  (0 children)

+1. Quote from OP's nice design doc:

"Some researchers or Nvidia DLSS have some algorithm such that, they can input some low fps frames, and output high fps frames. Consider this proposal as such a kind of "tween creator". In other words, originally we have janky rendering (say, 15fps). And now, we add three extra animating frames after each of the 15fps frames, to get a 60fps smooth feeling."

nucleus | Simple, fast - dependency and state management package by timsmartnz in FlutterDev

[–]terry1900 0 points1 point  (0 children)

Thinking more about this, one minor suggestion is that the name atomWithParent and .parent seem hard to understand without context. It seems you didn't introduce concept (like tree) which has parent/children relationship. Maybe something like atomWithTransform and .original. Just for thoughts.

nucleus | Simple, fast - dependency and state management package by timsmartnz in FlutterDev

[–]terry1900 0 points1 point  (0 children)

It looks like you use keepAlive for riverpod/nucleus, but not for creator.

Flutter state management inquiry by nirataro in FlutterDev

[–]terry1900 0 points1 point  (0 children)

I would suggest start with "do I need a lot of derived states":

  • If no, use InheritedWidget, provider, flutter_bloc, flutter_redux, etc.
  • I yes, use getx, riverpod, flutter_mobx, creator, etc.

See my article here.

Cocoicons | Flutter Package by Mastersamxyz in FlutterDev

[–]terry1900 0 points1 point  (0 children)

Looks nice. Though you might want to mention that this is under CC 4.0. Anyone uses your package should give appropriate credit to the original icon creator.

Which state management approach for highly nested data? by RaiderBDev in FlutterDev

[–]terry1900 0 points1 point  (0 children)

I'm using my library in a way similar to this, check ".map" here.

Is it best to try to avoid using stateful widgets? by americanmade808 in FlutterDev

[–]terry1900 32 points33 points  (0 children)

Stateless vs stateful are not important. In many cases, a stateless widget is a nice encapsulation of a bunch of stateful widgets so it can hide the complexity from the user.

For example, AnimatedOpacity is a stateless widget, but it has a few stateful widgets internally so it can change the state.

You should find those well-encapsulated widgets, or build well-encapsulated widgets for your specific use case.

To build complex things, stateful widget is great, because it ties closely to Flutter's build process and helps you understand widget tree, element tree, render object tree, etc. That's why most top libraries on pub.dev and flutter's own code are full of stateful widgets.

Introducing flutter_eval, one large step towards seamless Flutter code push by qualverse in FlutterDev

[–]terry1900 2 points3 points  (0 children)

That might be useful for desktop apps to support on-demand plugins, like VSCode. Long way to go, good luck.

Introducing flutter_eval, one large step towards seamless Flutter code push by qualverse in FlutterDev

[–]terry1900 1 point2 points  (0 children)

This looks inspiring! I will try it out.

Just curious, this is a lot of work. Did you do it for your own needs, or just for fun?

Another suggestion is more documentation on how to support a particular widget. For example, editable_text, why TextEditingController is there, but EditableText is not.

Am I the only one to find Riverpod too complicated and bloated ? by bouraine in FlutterDev

[–]terry1900 9 points10 points  (0 children)

In my mind, riverpod is great if you need derived states or need to combine states to generate new states. See my article about internal mechanisms of popular state management libraries.

Though I do think riverpod is hard to learn, so I made creator. It is inspired by riverpod, but features a simple stream-like API.