Commit Graph

573 Commits

Author SHA1 Message Date
Dionisio E Alonso 61993b21c9 Merge branch 'refactor-lua-configs' 2024-01-06 18:10:19 -03:00
Dionisio E Alonso b2a699cc02 feat(LSP): Move all server settings file into same directory
Group all the files corresponding to servers' specific settings, to the
same directory.
2024-01-06 17:40:29 -03:00
Dionisio E Alonso 37da48aaf5 feat(LSP): Rename the servers' configurations entry point
Put the main entry point for different servers' customizations into its
own module to group all the servers' related files under the same scope.
2024-01-06 16:05:56 -03:00
Dionisio E Alonso b87d50b6a9 feat(LSP): Rename the main LSP configuration module
As this module is the main entry point of all the LSP servers
configurations, it makes sense to rename it as init.lua and place it
under the directory grouping all the LSP related modules.
2024-01-06 15:21:07 -03:00
Dionisio E Alonso 3f0f6f9f85 feat(LSP): Restore sub-modules call to lsp_client_settings
This is an intermediate step, those calls were OK there beforehand.
2024-01-06 13:14:11 -03:00
Dionisio E Alonso d201a98346 feat(LSP): Rename workpace configs file
To give less sensation that only the settings key is configured within,
as some servers only accept parameters via the `cmd` key, for instance,
the file has now a more general name.
2024-01-05 21:52:02 -03:00
Dionisio E Alonso a41548bc0b feat(LSP): Correct module for fortls LSP
Now that the fortls configuration is by options, the previous module
name has no sense for current contents of the file.
2024-01-05 19:41:13 -03:00
Dionisio E Alonso 3016873438 feat(TreeSitter): Migrate tree-sitter settings file to Lua
Exactly the same modifications as in previous commit for the Neovim
native LSP client configuration, but this time with the tree-sitter
module.
2024-01-05 19:38:55 -03:00
Dionisio E Alonso d38abb38a7 feat(LSP): Migrate remaining LSP related files to Lua
The remaining file for setting up Neovim as an LSP client, that was
still as vim-script, was already invoking all Lua functionality embedded
as a here-doc in vim-scrip.

It made more sense to finally migrate that one file, and call `lua require`
instead of `runtime!` when invoking inside `init.vim`.
2024-01-05 19:26:33 -03:00
Dionisio E Alonso 10762c34c8 feat(LSP): Move all LSP sub-modules into LSP initialization 2024-01-05 19:19:15 -03:00
Dionisio E Alonso d256e4ccc6 feat(LSP): Refactor repeated statements
Instead of defining the same table (capabilities) for each configured
server, save that value in a variable and use the variable later on.
2024-01-05 19:17:15 -03:00
Dionisio E Alonso fd9a401c09 feat(LSP): Set fortls options explicitly
Instead of adding some hook that secretly changes the command line for
the LSP server underneath, achieve the same behaviour but passing
options on server initialization.
2024-01-05 19:08:48 -03:00
Dionisio E Alonso b527a82099 Merge branch 'master' into refactor-lua-configs 2024-01-05 17:47:04 -03:00
Dionisio E Alonso 96731b1e3d feat(LSP): Add first attempt to support inlayHints 2024-01-05 17:45:30 -03:00
Dionisio E Alonso 052565cba4 fix(LSP): Update capabilities usage according to docs
Around an year ago, the capabilities for the `nvim-cmp` plugin have been
updated and there is a new default in Neovim.  This change uses that new
default according to documentation from `nvim-cmp` plugin.
2024-01-05 16:07:35 -03:00
Dionisio E Alonso 538afba5d4 feat(LSP): Correct comments in LSP config example
There is no need, with current configuration, to use a custom
`on_attach` function on LSP setup.  Hence, this has been removed from
the comments.
2024-01-05 15:23:22 -03:00
Dionisio E Alonso d89024cbd6 feat(LSP): Add some optional server's settings
This LSP server is not usually used, but configuration is not trivial
and this configs serve as reference.
2024-01-05 15:05:38 -03:00
Dionisio E Alonso 53c0b334d5 feat(LSP): Add LSP servers for some new languages
Added LSP servers' configurations for Rust and Haskell.  Both languages
have been recurrently used and there is no reason not to include them in
default settings.
2024-01-05 14:52:15 -03:00
Dionisio E Alonso b9eed1129e Merge branch 'refactor-lua-configs' 2024-01-04 20:09:46 -03:00
Dionisio E Alonso d89dbf5458 feat(LSP): Final part of the refactor. Explicit call of LSPs
Now that code looks cleaner and there are less things going around, made
the different LSPs servers setups explicit.  With this change there is a
clear picture of which LSP requires extra/custom options and which
don't.
2024-01-04 17:01:58 -03:00
Dionisio E Alonso 8ca87ed93d feat(LSP): Change scope in variable definition 2024-01-04 09:49:48 -03:00
Dionisio E Alonso b34e086af0 feat(nvim-cmp): Delete setting for completeopt
Setting the completeopt option when initializing nvim-cmp is no longer a
standard recommendation from their docs.  Since nvim-cmp has its own
completion menu, and as long as that menu is used instead of
`<C-x><C-o>` to launch the native ins-completion menu, there is no need
to change the default behavior of the option.

This was discussed here:
https://github.com/hrsh7th/nvim-cmp/discussions/941
https://github.com/hrsh7th/nvim-cmp/pull/1442
2024-01-04 09:40:24 -03:00
Dionisio E Alonso 2d6fe48209 feat(LSP): Move completeopt setting into completion module
This setting corresponds to setup need specifically by the nvim-cmp
plugin for working as a source within Neovim's ins-completion
(https://neovim.io/doc/user/insert.html#ins-completion) but otherwise
not needed to be set to something different than its default.
2024-01-04 09:38:08 -03:00
Dionisio E Alonso b220ce5b78 feat(LSP): Move declarations to module scope
For local imports of modules, move the corresponding definitions into
module's scope, instead of restricting their declaration to the
function/s where they are later used.

With this change, one same import can be reused in different parts of
the module.
2024-01-04 07:59:58 -03:00
Dionisio E Alonso d377565fae feat(LSP): Regroup modules and settings in Vim's module
Keeping the same semantics, reordered all the module loading inside the
Neovim's LSP client configuration module.
2024-01-04 07:39:52 -03:00
Dionisio E Alonso 9f9363fefb feat(LSP): Move Git completion autocmd into completion module
As this auto-command is meant to configure how nvim-cmp provides
completions for the specific gitcommit file type, those settings belong
to the completions Lua module.
2024-01-04 07:31:25 -03:00
Dionisio E Alonso ff05144002 feat(LSP): Move LSP completion settings into its own module 2024-01-04 07:29:31 -03:00
Dionisio E Alonso d719941ac0 feat(LSP): Move lspkind settings into completion autocommand
The lspkind settings only apply to the completion menu, then, it makes a
lot more sense to have those settings in the same auto-command as the
rest of settings related to completion, specially because all those
settings are related to the same plugins family (nvim-cmp).
2024-01-04 07:18:03 -03:00
Dionisio E Alonso 3ffe14de35 feat(LSP): Move diagnostics signs into diagnostics module 2024-01-03 21:17:00 -03:00
Dionisio E Alonso ce1200c4fe feat(LSP): Move LSP diagnostics settings into its own module 2024-01-02 19:39:25 -03:00
Dionisio E Alonso 7cd667c4d8 feat(LSP): Move LSP keymaps into its own module 2024-01-02 19:38:02 -03:00
Dionisio E Alonso 545b81f176 feat(LSP): Reduce coalescing between blocks of code
Brought some lines that can be together, further closer to improve
readability.
2024-01-02 18:58:39 -03:00
Dionisio E Alonso 1fbe5ef6f5 Merge branch 'master' into refactor-lua-configs 2023-12-31 18:49:18 -03:00
Dionisio E Alonso 85d51fc55b Merge branch 'on-attach-refactor' into refactor-lua-configs 2023-12-31 16:48:13 -03:00
Dionisio E Alonso 1d5e0676a2 feat(LspAttach): Correct indentation in LspAttach function 2023-12-31 16:47:12 -03:00
Dionisio E Alonso 48c9c1b2a7 feat(LspAttach): Use the LspAttach hook to replace custom on_attach
With this replacement, same as for keymaps, now, the on_attach argument
on LSP servers setup can be completely avoided.  This change ends up
simplifying the LSP-server setup step making it more general.
2023-12-31 16:42:08 -03:00
Dionisio E Alonso f9d59d9235 feat(LspAttach): Correct indentation in keymaps function 2023-12-31 14:01:00 -03:00
Dionisio E Alonso 928a7e4bf9 feat(LspAttach): Make use of the LspAttach hook for keymaps
Instead of calling the function that sets all the custom keymaps at the
end of the custom `on_attach` function, directly add the function as a
hook to the LspAttach event.

With this change more modularization is possible, being able to move all
the keymaps settings to other parts of the config files.
2023-12-31 13:55:12 -03:00
Dionisio E Alonso 7fa13bd343 feat(emacs): Delete unnecessary setting. It's the default 2023-12-07 20:43:31 -03:00
Dionisio E Alonso 7be91c5d50 feat(emacs): Move setting to the correct scope 2023-12-07 20:42:57 -03:00
Dionisio E Alonso 734d82d929 feat(emacs): Update fontface to use Iosevka as well 2023-12-07 09:14:04 -03:00
Dionisio E Alonso 7147e1742f feat(emacs): Migrate configuration to newer versions 2023-12-06 16:59:25 -03:00
Dionisio E Alonso 1fadee0285 refactor: Rename variable in client-server settings module
Rename Lua table to a more general name because now not only "settings"
values are stored in each servers' module, but others like `cmd` as
well.
2023-11-26 19:05:04 -03:00
Dionisio E Alonso 140c6c3681 feat(Neovim): Update VSCode's codicons signs in diagnostics 2023-11-14 16:02:04 -03:00
Dionisio E Alonso 8f100cbfc9 feat(TilingAssistant): Minor corrections to the Coding profile, 1920×1080
Added a default separation of 4 (instead of the previous 2 for 1366×720)
between windows when in tiled positions.  After that default separation,
distances had to bee adjusted a little bit.
2023-09-21 09:17:59 -03:00
Dionisio E Alonso 484092ed57 feat(Neovim): Minor refactor in TreeSitter settings file 2023-09-20 08:38:01 -03:00
Dionisio E Alonso 99344ab82a feat(Neovim): Add auto-install setting to TreeSitter
Instead of relying on constantly keeping up to date the list of ensured
installed parsers, auto-install them as long as they are being needed by
the editor (when a buffer of a new filetype is opened).
2023-09-20 08:34:44 -03:00
Dionisio E Alonso 1e1c1840fd feat(Neovim): Add Haskell to TreeSitter settings 2023-09-19 20:44:42 -03:00
Dionisio E Alonso 6c7e264aca feat(TilingAssistant): Add coding-layout for 1920×1080 screens 2023-09-19 10:16:14 -03:00
Dionisio E Alonso 38e2906961 feat(TilingAssistant): Add coding-layout for 1366×768 screens 2023-08-27 19:00:31 -03:00