4
3

I am using counsel with projectile mainly for two use cases:

  • counsel-projectile-ag for project-wide grep
  • counsel-projectile-find-file to get a list of file names by typing some characters.

I usually have them bound to C-C C-sand C-C C-f, which used to work well with any other major modes.

Recently, I switched to using tree-sitter and set it up to use python-ts-mode. I also started using lsp-mode. Since then, whenever I open any python file, C-c C-s and C-c C-f are bound to the functions from python-mode. I've tried adding

(unbind-key "C-c C-s" python-ts-mode-map)
(unbind-key "C-c C-f" python-ts-mode-map)

to python-ts :config on use-package, and similar to python-mode, but I am still getting

python-ts-mode-map), which is an interactive native-compiled Lisp
function in ‘python.el’.

It is bound to C-c C-s.

(python-shell-send-string STRING &optional PROCESS MSG)

Send STRING to inferior Python PROCESS.
When optional argument MSG is non-nil, forces display of a
user-friendly message if there’s no process running; defaults to
t when called interactively.

[back]

What would be the correct way to set the configuration to get this always bound to the counsel-projectile commands whenever I open a python file?

Caveat: I am using NixOS home-manager to manage my emacs installation, which means that I am not manipulating my .emacs directly.

The relevant sections of my nix file.

usePackage = {
python-ts-mode = {
        enable = true;
        mode = [ ''("\\.py\\'" . python-ts-mode)'' ];
        hook = [
          "hs-minor-mode"
          "(python-ts-mode . python-isort-on-save-mode)"
        ];
        bind = {
          "C-c C-s" = "counsel-projectile-ag";
          "C-c C-f" = "counsel-projectile-find-file";
        };
        config = ''
        (unbind-key "C-c C-s" python-ts-mode-map)
        (unbind-key "C-c C-f" python-ts-mode-map)
        '';
      };

python-mode = {
        enable = true;
        bind = {
          "C-c C-s" = "counsel-projectile-ag";
          "C-c C-f" = "counsel-projectile-find-file";
        };
        config = ''
            (unbind-key "C-c C-s" python-mode-map)
            (unbind-key "C-c C-f" python-mode-map)
        '';
      };
lsp-mode = {
        enable = true;
        command = [ "lsp" ];
        hook = [
          "((python-ts-mode java-mode vue-mode javascript-ts-mode typescript-ts-mode) . lsp-deferred)"
        ];
        bind = {
          "C-c r r" = "lsp-rename";
          "C-c r f" = "lsp-format-buffer";
          "C-c r g" = "lsp-format-region";
          "C-c r a" = "lsp-execute-code-action";
          "C-c f r" = "lsp-find-references";
          "C-c C-s" = "counsel-projectile-ag";
          "C-c C-f" = "counsel-projectile-find-file";
        };
      };
counsel = {
        enable = true;
        bind = {
          "C-x C-d" = "counsel-dired-jump";
          "C-x C-r" = "counsel-recentf";
          "C-x C-y" = "counsel-yank-pop";
        };
        diminish = [ "counsel-mode" ];
      };

      counsel-projectile = {
        enable = true;
        bind = {
          "C-c C-s" = "counsel-projectile-ag";
          "C-c C-f" = "counsel-projectile-find-file";
        };
      };
};

Any help appreciated.

1
3
Scale Ruins Everything (coldwaters.substack.com)
2
62
4
11
[-] rglullis@communick.news 26 points 2 months ago

Could all of you go outside for a little bit, touch grass, smile at a stranger?

Sometimes I get angry at myself for wasting my time in pointless discussions, but this is next-level wankery. If you know that hexbear is a pig hut, don't come here to complain that you are full of mud and pig shit in your face.

Reported as off-topic.

14
9
COSMIC Alpha 2 Released (blog.system76.com)
93

I have a number of Lemmy instances meant for discussion groups around specific topics. They are not being as used as I expected/hoped. I would like to set them up in a way that they can be owned by a consortium of different admins so that they are collectively owned. My only requirement: these instances should remain closed for registrations and used only to create communities.

2
[-] rglullis@communick.news 26 points 3 months ago

The indieweb already has an answer for this: Web of Trust. Part of everyone social graph should include a list of accounts that they trust and that they do not trust. With this you can easily create some form of ranking system where bots get silenced or ignored.

[-] rglullis@communick.news 30 points 6 months ago

GPL means big corporations just won’t use it.

Great. No corporation is working on software for the freedom of its users.

they will just search for an alternative or make their own.

Or pay the developer to dual license, which can and should be the preferred way for FOSS developers to fund their work?

[-] rglullis@communick.news 32 points 8 months ago

But blocking the instance at the DNS level does not stop the content from reaching other Russian instances, right? They would have to basically track every server that is federating with them and block like this.

[-] rglullis@communick.news 32 points 8 months ago

It is not perfect, but it has been usable for quite a while. It's clocking already at tens of millions of active users per month, so it's not like all these people are just suffering around and not chatting and talking with their groups.

Also, unlike Reddit, it does not need to have a strong migration from all the long tail of niche communities. There are bridges already, so even if just, e.g, 5% of the discord base moves to it, it will be already enough to jumpstart a significant shift.

[-] rglullis@communick.news 24 points 9 months ago

This is 100% on Mastodon to fix.

[-] rglullis@communick.news 26 points 9 months ago* (last edited 9 months ago)

I know you said it is a brain dump, but your follow up still seems mostly an emotional reaction to how the devs responded rather than a reasoning synthesis process.

E.g, your "Where Fediverse Software Differs", it seems like you want to pay off the set up you've placed in the previous paragraph (about the difficulty of being an open source developer), but this payoff never comes and instead you end up the argument with "The feature requests valid, and the devs responded like dicks".

Even if we take "the feature request was valid" for granted, it does not follow that the devs must act on it right away. If the Lemmy devs acknowledged the issue and said "You are absolutely right and we strongly advise anyone hosting an instance in the EU if they are worried about GDPR", then what? Do you think that whoever wrote the "perfectly valid feature request" should still be pushing for making it a higher priority? On what grounds?

Also:

The operators, who to some degree help the project gain visibility, support, and money, are themselves doing unpaid labor: community building, moderation (...)

shouldn't ever be used as an excuse to justify free labor from developers. This is not Self-Loathing and Display of Low Self-Steem Olympics. Anyone that comes to me with a "I'm not gaining anything from my work" argument will promptly receive "The fact that you can not establish boundaries and are martyring yourself is not my problem" as a response.

The fact that developers of FOSS software project are able to tell users "If you want something done, you need to give us the resources or do it yourself" should be lauded, not criticized or be seen as "dicks".

If instance owners are dealing with bad users "and not getting paid for it", they can do two things: close down the instance, or put proper boundaries and tell what they are willing and not willing to do for free. Alternatively, they can do what I do and make the relationship explicitly transactional: I'm more than willing to work a lot to solve my customer's problems, but this is only after they actually paid me for it. The fact that I only accept paying customers makes my instance noticeably easier to manage. Even if I'm charging way less than what some people would donate to their favorite instance, the fact that all the users from the instances are paying make for an excellent filter.

The common denominator is relatively simple to understand: good optics of a project leads to more users, leads to more communities, leads to people building all kinds of apps and tools for those communities, leads to more people being willing to donate to a project.

This "donation-based" approach needs to change. Mastodon has no problems with "optics", and its "Founder and CEO" is reportedly making 30000€ as yearly salary. This is ridiculously low. This is less than what an intern makes at Facebook. The three Lemmy devs are sharing less than 4k€/month. You can make more money by working part-time on Uber Eats. To think that this is enough to claim "they are making some money" is frankly absurd.

If society in general is so tired of exploitative Big Tech, society needs to give a strong signal that it's willing to pay for the alternative. If we don't want to have the most brilliant minds of our generation working on how to optimize the amount of ads that you get to see online, then we need to show that those building better solutions can be properly rewarded. It's not up to the developers to try to build out everything perfectly and then go around begging for people for breadcrumbs and their seal of approval.

To sum up: I'm not saying that developers need to be worshipped because they can do what others can't. I'm also not saying that the Lemmy devs were right in how they communicate with its users, but I am saying that they are absolutely right in establishing their priorities and not let their work be dictated by someone that is not putting any Skin on The Game.

[-] rglullis@communick.news 28 points 9 months ago

I think y'all are expecting too much from 2-3 poorly funded developers who are being overwhelmed by hundreds of thousands of people who grew used to have a "free" product developed by a giant corporation who employs thousands of people and has revenue in the hundreds of millions.

I also think that this constant chasing for the next Messiah is counterproductive. I wish the best of luck for the Sublinks developers, but I also wish they could find a way to work to grow the ecosystem as a whole instead of competing for such a small slice of the Internet.

To put it all together: If the largest issue with Lemmy is tooling for moderation and proper instance management, I'd be more than willing to refocus my work on Fediverser into it. But I have to say that I can not put any more effort into it without getting proper compensation for anything. As much as I'm hopeful to see the Fediverse grow and for the downfall of Big Tech, I know that we will need more (a lot more) than just a handful of people working on this as side-job while thousands of other just keep watching and repeating "Are we there yet? Are we there yet?"

[-] rglullis@communick.news 30 points 10 months ago

Should federation between servers be opt-in?

Should Mastodon-compatible clients have posts private-by-default on the UI?

This argument against bridges is beyond stupid. If you are posting on a public network, it's more than reasonable to work with the expectation that your content will be visible outside of original channel.

[-] rglullis@communick.news 26 points 11 months ago

If you go through the comments, you will see that the devs talk about an issue with the logic in the for loop, which "may be stopping before it should". Writing a couple of test cases that check whether this is true or not should be trivial.

I'd expect at the very least some type of regression tests to be implemented for every bug that makes into production, to avoid cases like this one where the developers spend weeks figuring out whether their patches even fix the bug in the first place.

[-] rglullis@communick.news 25 points 2 years ago

That's the spirit. We don't need to complete obliterate reddit to make it the better alternatives viable. We just need to get a minimal mass of people here to keep momentum growing.

I keep thinking of Taleb's essay where he talks about how effective a intolerant minority can be on affecting change in general behavior.

view more: ‹ prev next ›

rglullis

joined 2 years ago
MODERATOR OF