Commit graph

38 commits

Author SHA1 Message Date
Daniel Siepmann cee10964f0
Replace neovim telescope with fzf
I've added fzf to zsh and don't want to have multiple different
solutions for same problem.
I therefore use fzf-lua within neovim which replaces telescope.
2023-03-02 13:25:23 +01:00
Daniel Siepmann a9456194a2
Stick to xdebug default port 9003 2023-02-23 13:29:11 +01:00
Daniel Siepmann 3afb0b7b93
Improve rst workflow
Add existing languagetool for rst files.
Add new rstcheck.
2023-02-05 16:43:48 +01:00
Daniel Siepmann bc33856c74
Migrate setup to new ctags version
The new version already has support for xml and yaml.
2022-11-09 08:20:58 +01:00
Daniel Siepmann 359ee0f74d
Revert "Replace vim NERDtree with nvim-tree-lua"
This reverts commit 7e844adde2.

Keep NERDTree instead of nvim tree lua.
Mostly because it uses very small inputs for file paths.
I couldn't find an easy way to move files.
It opens files with absolute path instead of relative to cwd which will
also influence my snippets.
2022-10-31 09:21:17 +01:00
Daniel Siepmann 87f3310ae3
Keep netrw as it provides features like gx to open urls and files 2022-10-27 14:39:38 +02:00
Daniel Siepmann 7517103501
Enable reStructuredText ctags support 2022-10-20 10:31:26 +02:00
Daniel Siepmann 0fb2dcf6cc
Hide dotfiles in neovim tree by default 2022-10-17 15:48:11 +02:00
Daniel Siepmann 005fb3cb96
Remove commented out option
extended_properties are send by vdebug out of the box, no need to
explicitly set them.
2022-10-17 08:22:33 +02:00
Daniel Siepmann 7e844adde2
Replace vim NERDtree with nvim-tree-lua
As neovim 0.8.0 doesn't properly refresh after NERDtree actions like
moving files finishes.
2022-10-12 09:46:14 +02:00
Daniel Siepmann cc911a0d91
Integrate neovim snippets into ctags
To easily find and navigate to snippets.
2022-10-11 08:27:56 +02:00
Daniel Siepmann 68e2e85d49
Replace telescope-ui-select-nvim with dressing-nvim
Configures the hole UI stuff, no need for different plugins.
2022-06-08 08:51:31 +02:00
Daniel Siepmann 126ec8481e
Use telescope as select ui in neovim 2022-06-08 08:47:55 +02:00
Daniel Siepmann 56f0e7ce8d
Remove treesitter from neovim
Not an in line replacement yet.
Stuff like auto indent in php doesn't work yet.
No benefit for me for now.
2022-05-30 17:14:17 +02:00
Daniel Siepmann 41a03f832d
Configure neovim to show all telescope builtin + extensions
As seen on
https://www.reddit.com/r/neovim/comments/tw2d1q/are_additional_pickers_supposed_to_appear_in_the/
2022-05-25 13:17:48 +02:00
Daniel Siepmann 3f76453f79
Cleanup ale configuration file
Remove old commented out blocks.
Remove unnecessary function and call, just set the option.
2022-05-23 18:45:51 +02:00
Daniel Siepmann 003b6be119
Integrate languagetool into neovim
I already set it up as service for firefox extension.
This now also integrates into neovim.
2022-05-23 18:45:51 +02:00
Daniel Siepmann ec90898c38
Add tree sitter to neovim
This installs used languages.
Also update colorscheme to support new hi groups introduced by ts.
2022-05-20 11:05:26 +02:00
Daniel Siepmann bdbaaba2fd
Remove Neovim cmp autocomplete
I found it to disturbing and prefer the native behaviour I am used to.
2022-04-12 16:44:03 +02:00
Daniel Siepmann 774e4f8555
Rename Neovim custom telescope
The keyboard shortcut was already in use.
I therefore renamed custom_functions into custom runs.
That way I can add multiple things in the future.
E.g. the items to select can also be a table which defines the name as
well as what to execute. That way I could add functions, commands and
other things.
2022-03-23 16:37:26 +01:00
Daniel Siepmann 380e4b6cd7
Add first custom Neovim Telescope picker
This adds a list of my custom defined functions for easier calling.
2022-03-23 09:31:33 +01:00
Daniel Siepmann 30db8651a7
Improve cmp and lsp integration in Neovim
Use omni after more specific completions.
Add buffer to completion, not as fallback. I often wanna complete from
current buffer.

Keep syntax consistent when requiring lua modules.
2022-03-23 08:23:10 +01:00
Daniel Siepmann b97c6b363b
Enable Neovim cmp lsp support
It just works now, I probably have changed something to make that happen
but don't know what exactly.
2022-03-23 07:41:26 +01:00
Daniel Siepmann cb7d380e0b
Add Neovim cmp autocompletion
Finally a fast none disturbing auto completion.
lsp_signature_nvim is kept as it provides info while filling in
arguments.
cmp lsp didn't work in my case, so didn't add it.
2022-03-22 13:31:26 +01:00
Daniel Siepmann 1b2e8a969a
Remove Neovim dadbod database integration
Autocompletion is way behind mycli / litecli. And that's more important
to me. So do not keep the plugins. Keep existing workflow instead.
2022-03-22 07:47:28 +01:00
Daniel Siepmann a527da50ac
Add Neovim dadbod-* plugins
Not sure if I'll settle on that. I'm currently used to mycli and
litecli.
But sounds useful to have it within the editor to not have different
programs with different configuration and behaviour.
2022-03-21 16:01:01 +01:00
Daniel Siepmann a9c1c526f1
Adjust Neovim Telescope design
Use ascending sorting to move selection to the prompt.
Also shorten width as it felt to much on my larger screen.
2022-03-21 15:49:17 +01:00
Daniel Siepmann 3269d15f1d
Extend neovim telescope tags with sql
Also add alphabetical sorting of configuration keys.
2022-03-16 15:38:49 +01:00
Daniel Siepmann 40cef5b623
Add LSP basics (PHP)
Add for PHP via existing phpactor as server.
Use new signature plugin for proper none irritating inline help during
function calls.

TODO: Get rid of preview window showing up …
2022-03-16 14:46:12 +01:00
Daniel Siepmann 0d4f5463d1
Migrate Leaderf to Telescope
Written in Lua.
Very flexible.
Clean documentation.
Easy to extend and configure.
Can do everything I wanted with a good feeling.
2022-03-16 14:44:49 +01:00
Daniel Siepmann e29ceb3b66
Optimize colors of leaderf Neovim plugin 2022-03-16 12:44:20 +01:00
Daniel Siepmann 42c78c694d
Cleanup leaderf configuration 2022-03-16 10:17:38 +01:00
Daniel Siepmann 51cb2c9ad3
Migrate Neovim CtrlP to FinderF
Way faster and matches my own preferences. Has a preview and pop up in
the center of the screen.
Comes with many other modes like colorscheme, help, line, etc.
diff --git a/home/programs/neovim.nix b/home/programs/neovim.nix
index 55783de..dda525c 100644
--- a/home/programs/neovim.nix
+++ b/home/programs/neovim.nix
@@ -239,8 +239,8 @@ in {
     }

     {
-      plugin = ctrlp-vim;
-      config = pkgs.lib.fileContents ./neovim/plugins/ctrlp.vim;
+      plugin = LeaderF;
+      config = pkgs.lib.fileContents ./neovim/plugins/leaderf.vim;
     }

     # Syntax
diff --git a/home/programs/neovim/config/functions.vim b/home/programs/neovim/config/functions.vim
index 24e0c00..fea577b 100644
--- a/home/programs/neovim/config/functions.vim
+++ b/home/programs/neovim/config/functions.vim
@@ -113,7 +113,7 @@ function! StartProfiling()
     execute(':profile file *')
 endfunc

-function! CtrlPCurrentComposerPackage()
+function! LeaderfCurrentComposerPackage()
     let l:filePath = split(expand('%:p:h'), '/')

     while !filereadable('/' . join(l:filePath + ['composer.json'], '/')) && len(l:filePath)
@@ -121,7 +121,7 @@ function! CtrlPCurrentComposerPackage()
     endwhile

     if len(l:filePath)
-        execute(':CtrlP /' . join(l:filePath, '/'))
+        execute(':LeaderfFile /' . join(l:filePath, '/'))
     else
         echom 'No composer package detected.'
     endif
diff --git a/home/programs/neovim/config/mappings.vim b/home/programs/neovim/config/mappings.vim
index bd3aee9..7b7ad7d 100644
--- a/home/programs/neovim/config/mappings.vim
+++ b/home/programs/neovim/config/mappings.vim
@@ -10,10 +10,11 @@ nnoremap <leader>v :set paste!<cr>
 nnoremap <leader>nh :nohlsearch<cr>

 " Configure navigation, e.g. go to buffer, file, ...
-nnoremap <leader>p :CtrlP<cr>
-nnoremap <leader>l :CtrlPBuffer<cr>
-nnoremap <leader>r :CtrlPBufTag<cr>
-nnoremap <silent> <leader>c :call CtrlPCurrentComposerPackage()<cr>
+nnoremap <leader>pp :LeaderfSelf<cr>
+nnoremap <leader>pf :LeaderfFile<cr>
+nnoremap <leader>pb :LeaderfBuffer<cr>
+nnoremap <leader>pt :LeaderfBufTag<cr>
+nnoremap <silent> <leader>pc :call LeaderfCurrentComposerPackage()<cr>

 nnoremap <leader>k :NERDTreeToggle<cr>
 nnoremap <leader>f :NERDTreeFind<cr>
diff --git a/home/programs/neovim/plugins/ctrlp.vim b/home/programs/neovim/plugins/ctrlp.vim
deleted file mode 100644
index c45b87e..0000000
--- a/home/programs/neovim/plugins/ctrlp.vim
+++ /dev/null
@@ -1,26 +0,0 @@
-let g:ctrlp_follow_symlinks = 2
-" Default to regex mode
-let g:ctrlp_regexp = 1
-let g:ctrlp_match_window = 'top,order:ttb,min:1,max:10'
-" let g:ctrlp_open_new_file = '0'
-" let g:ctrlp_lazy_update = 1
-let g:ctrlp_show_hidden = 1
-
-let g:ctrlp_types = ['fil', 'buf', 'buftag']
-
-let g:ctrlp_working_path_mode = 'w'
-let g:ctrlp_max_files = 0
-let g:ctrlp_clear_cache_on_exit = 0
-
-" Configure completion for tags in buffer,
-" e.g. configure which kinds to complete for css.
-let g:ctrlp_buftag_types = {
-  \ 'css' : '--css-types=vcit',
-  \ 'typescript' : '--typescript-types=cnfvmitesod',
-  \ 'xml' : '--xml-types=ci',
-  \ 'rst' : '--reStructuredText-types=csSt',
-  \ 'markdown' : '--Markdown-types=csStT',
-  \ 'fluid' : '--xml-types=si',
-  \ 'apache' : '--apache-types=s',
-  \ 'yaml' : '--yaml-types=t',
-\ }
diff --git a/home/programs/neovim/plugins/leaderf.vim b/home/programs/neovim/plugins/leaderf.vim
new file mode 100644
index 0000000..7627b07
--- /dev/null
+++ b/home/programs/neovim/plugins/leaderf.vim
@@ -0,0 +1,213 @@
+let g:Lf_WorkingDirectoryMode = 'c'
+
+let g:Lf_FollowLinks = 1
+let g:Lf_ShowHidden = 1
+
+let g:Lf_WindowPosition = 'popup'
+let g:Lf_HideHelp = 1
+
+let g:Lf_GtagsAutoUpdate = 0
+
+let g:Lf_IgnoreCurrentBufferName = 1
+
+let g:Lf_ShowDevIcons = 0
+
+" TODO: Try to port to existing colorscheme, does it work with load order?
+let g:Lf_PopupPalette = {
+    \  'dark': {
+    \   'Lf_hl_popup_inputText': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'blue',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_window': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_blank': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_cursor': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_prompt': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_spin': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_normalMode': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_inputMode': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_category': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_nameOnlyMode': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_fullPathMode': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_fuzzyMode': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_regexMode': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_cwd': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_lineInfo': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_total': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_cursorline': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': '235',
+    \   },
+    \   'Lf_hl_selection': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_match0': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'blue',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_match1': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'blue',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_match2': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'blue',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_match3': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'blue',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_match4': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'blue',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_match': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'blue',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_lineLocation': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_previewTitle': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_winNumber': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_winIndicators': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_winModified': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_winNomodifiable': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_winDirname': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_quickfixFileName': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_quickfixLineNumber': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_quickfixColumnNumber': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_loclistFileName': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_loclistLineNumber': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_loclistColumnNumber': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \  }
+    \ }
+
+let g:Lf_PreviewInPopup = 1
+let g:Lf_PreviewHorizontalPosition = 'center'
+let g:Lf_PreviewCode = 0
+let g:Lf_PreviewResult = {
+    \ 'File': 1,
+    \ 'Buffer': 1,
+    \ 'BufTag': 1,
+    \}
2022-03-16 09:05:13 +01:00
Daniel Siepmann f4b39fe17c
Do not show Neovim Ctrlp mru
I just don't use this feature.
2022-03-15 10:27:44 +01:00
Daniel Siepmann 1a61b2b103
Optimize Neovim plugin ctrlp file selection
Do not clear cache on exit. I'm working on huge projects and want a fast
file navigation.
Do not limit number of files as default is already way to low for the
large projects I'm working on.
2022-03-15 09:09:05 +01:00
Daniel Siepmann a683442f90
Remove neovim plugin syntastic
I'm using ale for such a long time already …
2022-03-14 16:31:57 +01:00
Daniel Siepmann a4f46efb9a
Update neovim ale plugin settings 2022-03-14 16:29:19 +01:00
Daniel Siepmann 082ad58af1
Migrate neovim setup
I managed my setup manually.
This commit ports the existing setup to home-manager.

The program module is used to install neovim together with plugins.
Custom plugins are now maintained at Gitea / GitHub and loaded via nix as well.
2022-03-12 11:26:32 +01:00