Browse Source

Updated post with a few things that I left out

master
Julio Biason 2 years ago
parent
commit
d8697a81d9
  1. 26
      content/code/redid-my-nvim-config/index.md
  2. 30
      content/code/redid-my-nvim-config/index.pt.md

26
content/code/redid-my-nvim-config/index.md

@ -39,3 +39,29 @@ and wristles:
The whole configuration file is [in my personal Git
repo](https://git.juliobiason.me/dotfiles.git/tree/nvim).
### What was left out?
When migrating, I few things I did not add in this new configuration:
- Fuzzy find: Previously I was using [Skim](https://github.com/lotabout/skim)
for opening files with fuzzy find (e.g., type a few letters, see a list of
the files with those letters). The Vim plugin for it was a bit flaky
(sometimes it would completely ignore the typed input, which I think it meant
it crashed somehow). But, 'cause I used only when bored, I decided that I
won't use a fuzzy find; my favourite way of finding files is using the `-`
shortcut, which I set to open `:Ex`.
- Snippets: [UltiSnips](https://github.com/sirver/UltiSnips) was not working
before, so I decided not to try it again. I'll probably look at some other
option in the future.
- Per FileType configuration: Previously I had a bunch of autocommands to set
specific configuration for each file type (e.g., Python files should always
use spaces instead of tabs, but HTML should use tabs instead of spaces). I
left it out mostly 'cause there is no Lua support for such commands yet, as
far as I know (you can run VimScript commands still, but I'm being a bit
retentive about mixing those).
- Auto-trim lines: My previous configuration used an autocommand for running a
regular expression that would remove all tailing spaces in the lines. Because
I use Rust mostly these days and the LSP configuration can run the
autoformatter (`rustfmt`, in this case) and this already remove tailing
spaces, I decided to leave this option out for now.

30
content/code/redid-my-nvim-config/index.pt.md

@ -41,6 +41,36 @@ firulas:
O arquivo de configuração (e submódulos) está no [meu repositório pessoal do
Git](https://git.juliobiason.me/dotfiles.git/tree/nvim).
### O que ficou pra trás?
Enquanto eu estava migrandion, eu resolvi não adicionar algumas coisas nessa
nova configuração:
- Fuzzy find: Anteriormente eu estava usando o
[Skim](https://github.com/lotabout/skim) para abrir arquivos com fuzzy find
(digite algumas letras, veja uma lista de arquivos que tem essas letras). O
plugin do Vim para o Skim apresentava alguns problemas (algumas vezes
ignorando completamente o que era digitado na entrada, o que me faz pensar
que o plugin teria crasheado de alguma forma). Mas, como eu só usava quando
estava entediado, eu acabei deixando a opção de fuzzy find de fora; minha
forma favorita de procurar arquivos é usando o atalho `-`, que eu botei para
chamar o `:Ex`.
- Snippets: [UltiSnips](https://github.com/sirver/UltiSnips) não estava
funcionando antes então eu resolvi não tentar de novo. Eu provavelmente vou
procurar por alguma outra opção no futuro.
- Configuração por tipo de arquivo: Anteriormente eu tinha um bocado de
"autocommands" para definir configurações específicas para cada arquivo (por
exemplo, arquivos Python devem usar espaços ao invés de tabulações, mas
arquivos HTML devem usar tabulações ao invés de espaços). Eu deixei de fora
porque, até onde eu vi, não há suporte na versão em Lua para isso (ainda é
possível rodar comandos VimScript, mas eu tô sendo meio chato com relação à
isso).
- Remover espaços no final das linhas: A minha configuração anterior tinha um
autocommand para executar uma expressão regular que removia todos os espaços
no final das linhas. Como eu atualmente estou usando mais Rust e a
configuração do LSP roda um autoformatter (no caso, o `rustfmt`) e isso já
remove os espaços, eu decidi não aplicar essa opção de novo.
<!--
vim:spelllang=pt:
-->

Loading…
Cancel
Save