Commit graph

96 commits

Author SHA1 Message Date
Ade Attwood
2b73b75ad3 refactor(vim): make the the status even more basic 2025-07-25 11:26:09 +01:00
6022083000 chore(vim): format csharp files with the lsp
This will be using `dotnet format` under the hood and take any settings from
the editorconfig. The advantage of this is it will only do the file, with
`dotnet format` you need todo the hole solution.
2025-01-21 08:24:34 +00:00
d7a955f103 chore(vim): remove eslint flags unstable_ts_config
This is no longer needed, in the eslint version we are using at work this is
now stable.
2025-01-21 08:19:18 +00:00
ac2b15e673 fix(vim): update lsp config to fix deprecations
Nvim lsp has changed the way the config works. This is now on all the versions
on nvim I am using. The main one is in tumbleweed this is relatively up to
date.

The sign_define has also moved into the diagnostic config.
2024-12-30 13:15:37 +00:00
26ae32de82 fix(vim): ensure we don't get errors if we are on old ivy 2024-12-30 13:15:37 +00:00
bbdcd42b27 feat(vim): add csharp snippets
This add most of the snippets I used to have. It implements a custom
env_namespace for adding in the namespace of the file based on where it in the
file tree.
2024-12-30 13:15:37 +00:00
4530bdfb56 fix(vim): start ts_lsp in monorepo
When you are in a monorepo you don't always have a tsconfig in the root. You do
however have a yarn.lock. This will now start ts_ls when it finds a yarn.lock
in the root of the repo.
2024-12-17 11:13:37 +00:00
dc23131046 feat(nu): setup nushell and start off the config
This is some investigation in to nushell will work. I will be looking to use
this cross platform, as zsh will not work on windows.

Adds some of the core modules so I don't loose my mind having to relearn mussel
memory. The goal of this is to replicate my use of oh-my-zsh, I think this will
take some time, I have sunk years into the zsh config. The aliases will be the
same, the GOPATH project structure will be replicated and the dir hooks will be
implemeted so my PATH gets setup just as I like it.
2024-12-08 10:55:05 +00:00
2755f69cd8 style(vim): format the lsp config 2024-11-28 18:18:02 +00:00
a7a99e16d0 chore(vim): add some ivy key mappings for testing
This is not really needed for my config. Its there so we can make sure this
config works for my config when developing ivy.
2024-11-28 18:15:40 +00:00
8000173917 refactor(vim): update the diagnostic sign icons
This uses different icons to try and make things look a bit more cool. The look
of vim is not something I have really been focused on however, I think it may
be time to spice things up.
2024-11-28 18:13:02 +00:00
cf51aa4842 feat(vim): add the deno lsp to the config
This is a bit tricky due to the filetype of deno being typescript. The
typescript server automatically starts on this filetype.

For now this looks in the root of the project to see if there is a deno.json or
package.json. Based on this, it will pick what one to use.
2024-11-28 18:09:51 +00:00
22eda7e6ed feat(vim): use the lsp to format f# files
For formatting f# there really is only one tool, fantomas. The CLI for fantomas
has no input and will only do files. Ionide has built in support for fantomas,
we need some extra config to make this work because right now we are only using
Neoformat for formatting.

This updates the formatting function to format with the lsp only for f# files.
Anything else it will fall back to usign Neoformat. I am hoping that there will
not be many cases of this and we can continue to use Neoformat.
2024-09-24 19:53:46 +01:00
63edfe28ce fix(vim): reformat the linters and add extra eslint flags
Removes the complete override to the linters and add extra flags to the
existing args. This will now automatically get any updates made to the plugin
linters.

This also add the `unstable_ts_config` to the eslint command so we can use
typescript configs with eslint 9. I don't really know how this will affect BC
with version 8, I will have to cross that bridge when we come to it. ATM this
is good for daily use of version 9.
2024-09-12 16:31:27 +01:00
3f2964cfcb feat(vim): display clippy diagnostics on save 2024-09-04 19:11:57 +01:00
9ff18b1688 feat(vim): setup ivy.nvim in the config
This was an update that now it does not get configured by default you need to
call the `setup` function to make it work.

See: https://github.com/AdeAttwood/ivy.nvim/pull/81
2024-09-04 19:10:24 +01:00
6b939f0486 feat(term): move to wezterm mux from tmux
So this is the first commit where we are starting to migrate from tmux.
Right now I'm not sure how this will go, every other attempt has not
lasted very long.

This does support all the features I am using in tmux though. TBH most
of the stuff in the tmux.conf wezterm does by default. For example, the
pain numbers start at 1 not 0.

This implements a fork of tmux navigation, the plugin I have been using
in vim since like.... day one.
2024-09-04 18:20:25 +01:00
4354948d88 refactor(vim): remove the ts-jest plugin
This was a plugin I had started writing and using for running jest tests
in a nvim buffer. This has now been split out into its own dedicated
plugin.

See: https://github.com/adeattwood/spec.nvim
2024-06-14 18:13:38 +01:00
6cbd7eb9ae feat(vim): add nvim-treesitter-textobjects
I have been wanting to play with this plugin for a long time now. I have
a minimal config that will give me most of what I need. Moving
parameters and arguments is a big one. Also selecting parameters, this
will also include the type definition so its much more powerful than
selecting words.

Jumping to functions has also been included, right now I am not sure how
much that will be used. My muscle memory is very used to <C-d> and <C-u>
for paging.
2024-06-14 18:03:07 +01:00
a5cd17fe58 feat(vim): add dev_case plugin for a better search and replace
When you are in a buffer sometimes you want to do a search and replace
but preserve the case. For example if we have the following code.

```rust
let some_struct = SomeStruct::new();
```

if we want to rename this to `another_struct` we can call dev case and
it will search and replace preserving the case. We can run the following
command.

```
:S some_struct another_struct
```

This will replace the above code so we will be left with

```rust
let another_struct = AnotherStruct::new();
```

This plugin handles calling the cli tool and displaying an in place
preview of the change so you can see exactly what you will be changing.
It uses the `S` custom command so it feels similar to the built in `s`
Substitute command.
2024-06-08 17:53:07 +01:00
78ba21f30d chore(vim): add some more of the busted globals 2024-06-08 17:50:56 +01:00
56bcdd34b3 refactor(core): move from base16 themes to nord
This is moves everything I can think of. A lot of the things I use have
this built in. The vim and tmux themes has been added so the place I
spend all my time looks nice.
2024-06-08 14:50:57 +01:00
4b55548a96 feat(vim): implement lua go to spec
This add a pattern for all lua files that will go to the corresponding
spec files. I don't think this will work on all the different projects
but, its a good start. There may need to be some tweaking to make it
work in vim plugins.
2024-06-03 08:15:10 +01:00
8fcf291c56 chore(vim): move back to eslint
All the issues have not been resolved with linting. Nvim lint is more
stable with its async linting.
2024-05-19 19:20:46 +01:00
dab35e8523 fix(vim): ensure run command open a new split
For some reason the Run command was no longer opening a new window. It
was just failing.
2024-05-19 19:18:46 +01:00
56b2b01f6f refactor(vim): move the cspell config to extend the builtin one
There have been some changes in the cspell config upstream to fix issues
in the cspell cli. These are mainly around the parsing of the output.

The only things my changes are adding in the file type and applying my
config file. They are only in the command not the parser.

Now we are using the upstream config and adding the extra params I need
rather than having to maintain a completely override.
2024-05-19 16:55:07 +01:00
bda740caf7 fix(vim): disable hover in liquid files
This is causing the same issues as the other file types, when there is
an lsp attached but it dose not support hover for this filetype
2024-05-03 07:51:28 +01:00
1a0828b763 feat(vim): setup c# and f# languages 2024-05-03 07:32:09 +01:00
b1746b0178 feat(vim): auto install treesitter grammars
Previously we were defining what ones we want to install. Now we are say
we want to install the grammar when we go to a file. If we don't have
that grammar installed then we will install it then
2024-04-10 19:17:42 +01:00
a1e089babb feat(vim): bump the priority of snippets in completion
I want the snippets to be the first thing in the completion when they
are available.
2024-04-10 19:12:59 +01:00
ad88b65474 refactor(vim): update the icons that show in completion 2024-04-10 19:09:24 +01:00
2f6e30fb53 refactor: start pulling out the prr config into a plugin
All the prr code review stuff will be in its own plugin soon. There are
some sweet features coming with a treesitter parser for syntax
highlighting.
2024-04-10 19:06:51 +01:00
53a9a07bf6 fix(vim): add busted globals to the lua diagnostics lsp
When writing tests with busted they use some other globals that you need
to tell you lsp about. I already have this for when I'm working on the
nvim config and configz.
2024-03-02 18:22:29 +00:00
ff3b54d281 feat(vim): allow emmet to be used in liquid files
When using the liquid templating language I would like to use emmet
syntax to expand html.
2024-03-02 18:20:21 +00:00
517e37769f feat(vim): allows inputing for Olmama model so we can use other models
Now you can run `Olmama <model>` to use Olmama with the selected model.
Now you don't have to use only Codellama; there are others we can use.
2023-12-27 11:18:30 +00:00
8de4999881 refactor(vim): update ollama plugin to use older APIs
The ollama plugin was using some APIs that are not yet available in nvim
stable. Now we are using the older APIs we can use this on other
versions of nvim.

The `vim.api.nvim_buf_set_text` does not take some parameters as `-1` to
add text to the end of the line. Now we are getting the text on the last
line adding the new text to it, then replacing the last line.
2023-12-26 10:38:59 +00:00
da223e930d style(core): run stylua 2023-11-24 08:01:34 +00:00
0fa7e58c98 feat(vim): have a play with marksman the markdown lsp 2023-11-24 07:54:33 +00:00
47688aa2b0 chore(vim): add ruby linters 2023-11-21 07:40:51 +00:00
ca4f0019a8 feat(vim): add the oil file management plugin
This is the plugin I have been using for a while now. I think its much
nicer to use than a tree style. Treating the filesystem as a buffer is
something I used in emacs and have come quite used to.
2023-11-20 08:03:03 +00:00
bfe83d49f4 fix(vim): only register linters when there is an executable
This is mainly for stylelint, I don't always have this installed and it
throws an error when you open a sass file and it tries to lint the
buffer. Now it will not know about any linters unless they are in the
PATH.
2023-11-20 07:57:34 +00:00
7f95ee24f8 refactor(vim): move to eslint_d from eslint
Eslint has become slow for some projects for reasons unknown. In an
attempt to speed up my linting process, I'm experimenting with eslint_d,
which keeps a process running. For the time being, I'd like to keep
linting and formatting separate from the Language Server Protocol (LSP)
to avoid the need to install every LSP. This way, I can have `shfmt`
without the bash LSP, for example.

For JavaScript, I may consider moving this into an LSP since I use it
for work, which would justify combining responsibilities. However, for
now, I'll be giving eslint_d a try.
2023-11-08 07:56:41 +00:00
4cffec6e7f chore(vim): remove indent-line, orgmode, and conjure
Indent Line is no longer in use; it's quite an old plugin, and there are
likely better ways to implement this functionality. For now, I won't be
using any indent markers, and we'll see how that goes. If I encounter
issues, I will explore alternative plugins.

Orgmode was an attempt to bring over the knowledge base from Emacs. Vim
doesn't have the same workflow as Emacs, and everything is less tightly
integrated into a single application. I have now transitioned to using
Markdown and Obsidian, focusing on the more widely-used Markdown
integration.

Conjure is too heavy for my needs. All I require is a simple plugin to
execute Clojure in a REPL. This plugin conflicts with many other plugins
and filetypes, where the LSP (Language Server Protocol) should handle
most of the heavy lifting. I've created my own plugin for my very basic
use case.

See: https://github.com/AdeAttwood/nrepl.nvim
2023-11-08 07:43:50 +00:00
82d2b12659 feat(vim): add the first impl of the ollama pluign
The Ollama plugin provides a simple way to interact with an Ollama
language model from within Neovim. It uses as many of the built in
features as possible like buffers, tabs and markdown. This will make
this as small as possible so you don't have to install plugins with
loads of features you don't use.
2023-11-06 08:34:24 +00:00
540b5b0c72 feat(vim): finally commit the copilot config
I have been using this for quite a while now. This add the copilot
plugin and the intergration with nvim-cmp
2023-11-05 18:09:41 +00:00
1f8b491825 feat(vim): add go to spec plugin
This will find the spec file that is associated to the current source
file.
2023-11-04 09:02:14 +00:00
11dc038c50 refactor(vim): update when the linters run
Move the linters to run on BufReadPost instead of BufEnter. This was
running the linters whenever a buffer opened, when jumping around
quickly with <CTRL-i> and <CTRL-o> this would cause the linters to run a
lot when there were not needed. Now were are only running them once when
the buffer is read from disk.

Adds a custom function that will add cspell to all of the filetypes.
This will then only run `try_lint` once to improve the performance. Now
neoformat has gone fully async. When calling `try_lint` one after the
other, the first processes were getting canceled.
2023-11-04 07:53:36 +00:00
ba4aca9636 feat(vim): add path completion to cmdline
This is actually quite nice. I use it all the time to be realy lazy and
type commands without capitalization.
2023-11-04 07:49:57 +00:00
a0c35f90b5 refactor(vim): move jest commands to use Run rather than run in process
The jest out put is quite hard to process. This points that were add
into the quickfix list where often incorrect. This is a bit pointless
and I would find myself running it again in the terminal to see all of
the output.

This will have todo until I can find time to create proper test runner,
I really don't like the look of any of the plugins available.
2023-11-04 07:09:50 +00:00
ed39483c40 fix(vim): force solargraph to use bundle exec
Solargraph is best used installed in your Gemfile, this will allow you
to use manage the versions by each project. This will ensure that we are
using the version in your Gemfile, not the one installed globally.
2023-10-15 15:46:01 +01:00