Newest version of dotfiles with Ghostty, Fish, kickstart vim and zsh updates
This commit is contained in:
BIN
.config/nvim/.DS_Store
vendored
BIN
.config/nvim/.DS_Store
vendored
Binary file not shown.
35
.config/nvim/.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
35
.config/nvim/.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Any bug report not following this template will be immediately closed. Thanks -->
|
||||
|
||||
## Before Reporting an Issue
|
||||
- I have read the kickstart.nvim README.md.
|
||||
- I have read the appropriate plugin's documentation.
|
||||
- I have searched that this issue has not been reported before.
|
||||
|
||||
- [ ] **By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.**
|
||||
|
||||
## Describe the bug
|
||||
<!-- A clear and concise description of what the bug is. -->
|
||||
|
||||
## To Reproduce
|
||||
<!-- Steps to reproduce the behavior. -->
|
||||
1. ...
|
||||
|
||||
## Desktop
|
||||
<!-- please complete the following information. -->
|
||||
- OS:
|
||||
- Terminal:
|
||||
|
||||
## Neovim Version
|
||||
<!-- Output of running `:version` from inside of neovim. -->
|
||||
|
||||
```
|
||||
```
|
||||
8
.config/nvim/.github/pull_request_template.md
vendored
Normal file
8
.config/nvim/.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
***************************************************************************
|
||||
**NOTE**
|
||||
Please verify that the `base repository` above has the intended destination!
|
||||
Github by default opens Pull Requests against the parent of a forked repository.
|
||||
If this is your personal fork and you didn't intend to open a PR for contribution
|
||||
to the original project then adjust the `base repository` accordingly.
|
||||
**************************************************************************
|
||||
|
||||
21
.config/nvim/.github/workflows/stylua.yml
vendored
Normal file
21
.config/nvim/.github/workflows/stylua.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Check Lua Formatting
|
||||
name: Check Lua Formatting
|
||||
on: pull_request_target
|
||||
|
||||
jobs:
|
||||
stylua-check:
|
||||
if: github.repository == 'nvim-lua/kickstart.nvim'
|
||||
name: Stylua Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Stylua Check
|
||||
uses: JohnnyMorganz/stylua-action@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: latest
|
||||
args: --check .
|
||||
|
||||
15
.config/nvim/.gitignore
vendored
15
.config/nvim/.gitignore
vendored
@@ -1,8 +1,7 @@
|
||||
tt.*
|
||||
.tests
|
||||
doc/tags
|
||||
debug
|
||||
.repro
|
||||
foo.*
|
||||
*.log
|
||||
data
|
||||
tags
|
||||
test.sh
|
||||
.luarc.json
|
||||
nvim
|
||||
|
||||
spell/
|
||||
lazy-lock.json
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
6
.config/nvim/.stylua.toml
Normal file
6
.config/nvim/.stylua.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
column_width = 160
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferSingle"
|
||||
call_parentheses = "None"
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
19
.config/nvim/LICENSE.md
Normal file
19
.config/nvim/LICENSE.md
Normal file
@@ -0,0 +1,19 @@
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,4 +1,240 @@
|
||||
# 💤 LazyVim
|
||||
# kickstart.nvim
|
||||
|
||||
## Introduction
|
||||
|
||||
A starting point for Neovim that is:
|
||||
|
||||
* Small
|
||||
* Single-file
|
||||
* Completely Documented
|
||||
|
||||
**NOT** a Neovim distribution, but instead a starting point for your configuration.
|
||||
|
||||
## Installation
|
||||
|
||||
### Install Neovim
|
||||
|
||||
Kickstart.nvim targets *only* the latest
|
||||
['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest
|
||||
['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim.
|
||||
If you are experiencing issues, please make sure you have the latest versions.
|
||||
|
||||
### Install External Dependencies
|
||||
|
||||
External Requirements:
|
||||
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
|
||||
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
|
||||
- Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
|
||||
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
|
||||
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true
|
||||
- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji`
|
||||
- Language Setup:
|
||||
- If you want to write Typescript, you need `npm`
|
||||
- If you want to write Golang, you will need `go`
|
||||
- etc.
|
||||
|
||||
> [!NOTE]
|
||||
> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
|
||||
> and quick install snippets
|
||||
|
||||
### Install Kickstart
|
||||
|
||||
> [!NOTE]
|
||||
> [Backup](#FAQ) your previous configuration (if any exists)
|
||||
|
||||
Neovim's configurations are located under the following paths, depending on your OS:
|
||||
|
||||
| OS | PATH |
|
||||
| :- | :--- |
|
||||
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
|
||||
| Windows (cmd)| `%localappdata%\nvim\` |
|
||||
| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` |
|
||||
|
||||
#### Recommended Step
|
||||
|
||||
[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo
|
||||
so that you have your own copy that you can modify, then install by cloning the
|
||||
fork to your machine using one of the commands below, depending on your OS.
|
||||
|
||||
> [!NOTE]
|
||||
> Your fork's URL will be something like this:
|
||||
> `https://github.com/<your_github_username>/kickstart.nvim.git`
|
||||
|
||||
You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file
|
||||
too - it's ignored in the kickstart repo to make maintenance easier, but it's
|
||||
[recommended to track it in version control](https://lazy.folke.io/usage/lockfile).
|
||||
|
||||
#### Clone kickstart.nvim
|
||||
|
||||
> [!NOTE]
|
||||
> If following the recommended step above (i.e., forking the repo), replace
|
||||
> `nvim-lua` with `<your_github_username>` in the commands below
|
||||
|
||||
<details><summary> Linux and Mac </summary>
|
||||
|
||||
```sh
|
||||
git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary> Windows </summary>
|
||||
|
||||
If you're using `cmd.exe`:
|
||||
|
||||
```
|
||||
git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim"
|
||||
```
|
||||
|
||||
If you're using `powershell.exe`
|
||||
|
||||
```
|
||||
git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Post Installation
|
||||
|
||||
Start Neovim
|
||||
|
||||
```sh
|
||||
nvim
|
||||
```
|
||||
|
||||
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
|
||||
the current plugin status. Hit `q` to close the window.
|
||||
|
||||
#### Read The Friendly Documentation
|
||||
|
||||
Read through the `init.lua` file in your configuration folder for more
|
||||
information about extending and exploring Neovim. That also includes
|
||||
examples of adding popularly requested plugins.
|
||||
|
||||
> [!NOTE]
|
||||
> For more information about a particular plugin check its repository's documentation.
|
||||
|
||||
|
||||
### Getting Started
|
||||
|
||||
[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)
|
||||
|
||||
### FAQ
|
||||
|
||||
* What should I do if I already have a pre-existing Neovim configuration?
|
||||
* You should back it up and then delete all associated files.
|
||||
* This includes your existing init.lua and the Neovim files in `~/.local`
|
||||
which can be deleted with `rm -rf ~/.local/share/nvim/`
|
||||
* Can I keep my existing configuration in parallel to kickstart?
|
||||
* Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME`
|
||||
to maintain multiple configurations. For example, you can install the kickstart
|
||||
configuration in `~/.config/nvim-kickstart` and create an alias:
|
||||
```
|
||||
alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim'
|
||||
```
|
||||
When you run Neovim using `nvim-kickstart` alias it will use the alternative
|
||||
config directory and the matching local directory
|
||||
`~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim
|
||||
distribution that you would like to try out.
|
||||
* What if I want to "uninstall" this configuration:
|
||||
* See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information
|
||||
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
|
||||
* The main purpose of kickstart is to serve as a teaching tool and a reference
|
||||
configuration that someone can easily use to `git clone` as a basis for their own.
|
||||
As you progress in learning Neovim and Lua, you might consider splitting `init.lua`
|
||||
into smaller parts. A fork of kickstart that does this while maintaining the
|
||||
same functionality is available here:
|
||||
* [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim)
|
||||
* Discussions on this topic can be found here:
|
||||
* [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218)
|
||||
* [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473)
|
||||
|
||||
### Install Recipes
|
||||
|
||||
Below you can find OS specific install instructions for Neovim and dependencies.
|
||||
|
||||
After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step.
|
||||
|
||||
#### Windows Installation
|
||||
|
||||
<details><summary>Windows with Microsoft C++ Build Tools and CMake</summary>
|
||||
Installation may require installing build tools and updating the run command for `telescope-fzf-native`
|
||||
|
||||
See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
|
||||
|
||||
This requires:
|
||||
|
||||
- Install CMake and the Microsoft C++ Build Tools on Windows
|
||||
|
||||
```lua
|
||||
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
|
||||
```
|
||||
</details>
|
||||
<details><summary>Windows with gcc/make using chocolatey</summary>
|
||||
Alternatively, one can install gcc and make which don't require changing the config,
|
||||
the easiest way is to use choco:
|
||||
|
||||
1. install [chocolatey](https://chocolatey.org/install)
|
||||
either follow the instructions on the page or use winget,
|
||||
run in cmd as **admin**:
|
||||
```
|
||||
winget install --accept-source-agreements chocolatey.chocolatey
|
||||
```
|
||||
|
||||
2. install all requirements using choco, exit the previous cmd and
|
||||
open a new one so that choco path is set, and run in cmd as **admin**:
|
||||
```
|
||||
choco install -y neovim git ripgrep wget fd unzip gzip mingw make
|
||||
```
|
||||
</details>
|
||||
<details><summary>WSL (Windows Subsystem for Linux)</summary>
|
||||
|
||||
```
|
||||
wsl --install
|
||||
wsl
|
||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||
sudo apt update
|
||||
sudo apt install make gcc ripgrep unzip git xclip neovim
|
||||
```
|
||||
</details>
|
||||
|
||||
#### Linux Install
|
||||
<details><summary>Ubuntu Install Steps</summary>
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||
sudo apt update
|
||||
sudo apt install make gcc ripgrep unzip git xclip neovim
|
||||
```
|
||||
</details>
|
||||
<details><summary>Debian Install Steps</summary>
|
||||
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt install make gcc ripgrep unzip git xclip curl
|
||||
|
||||
# Now we install nvim
|
||||
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
|
||||
sudo rm -rf /opt/nvim-linux-x86_64
|
||||
sudo mkdir -p /opt/nvim-linux-x86_64
|
||||
sudo chmod a+rX /opt/nvim-linux-x86_64
|
||||
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
|
||||
|
||||
# make it available in /usr/local/bin, distro installs to /usr/bin
|
||||
sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/
|
||||
```
|
||||
</details>
|
||||
<details><summary>Fedora Install Steps</summary>
|
||||
|
||||
```
|
||||
sudo dnf install -y gcc make git ripgrep fd-find unzip neovim
|
||||
```
|
||||
</details>
|
||||
|
||||
<details><summary>Arch Install Steps</summary>
|
||||
|
||||
```
|
||||
sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim
|
||||
```
|
||||
</details>
|
||||
|
||||
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
|
||||
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.
|
||||
|
||||
24
.config/nvim/doc/kickstart.txt
Normal file
24
.config/nvim/doc/kickstart.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
================================================================================
|
||||
INTRODUCTION *kickstart.nvim*
|
||||
|
||||
Kickstart.nvim is a project to help you get started on your neovim journey.
|
||||
|
||||
*kickstart-is-not*
|
||||
It is not:
|
||||
- Complete framework for every plugin under the sun
|
||||
- Place to add every plugin that could ever be useful
|
||||
|
||||
*kickstart-is*
|
||||
It is:
|
||||
- Somewhere that has a good start for the most common "IDE" type features:
|
||||
- autocompletion
|
||||
- goto-definition
|
||||
- find references
|
||||
- fuzzy finding
|
||||
- and hinting at what more can be done :)
|
||||
- A place to _kickstart_ your journey.
|
||||
- You should fork this project and use/modify it so that it matches your
|
||||
style and preferences. If you don't want to do that, there are probably
|
||||
other projects that would fit much better for you (and that's great!)!
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
@@ -1,2 +1,64 @@
|
||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
-- Grundeinstellungen
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = false
|
||||
vim.opt.mouse = 'a'
|
||||
vim.opt.showmode = false
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.undofile = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.signcolumn = 'yes'
|
||||
vim.opt.updatetime = 250
|
||||
vim.opt.timeoutlen = 300
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
vim.opt.inccommand = 'split'
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.scrolloff = 10
|
||||
vim.opt.hlsearch = true
|
||||
|
||||
-- Lade lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- neueste stabile Version
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Lade Plugins
|
||||
require("lazy").setup({
|
||||
-- Grundlegende Plugins
|
||||
{ import = "custom.plugins" },
|
||||
|
||||
-- Colorscheme
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("tokyonight").setup({
|
||||
style = "storm",
|
||||
transparent = false,
|
||||
terminal_colors = true,
|
||||
})
|
||||
vim.cmd.colorscheme "tokyonight"
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
-- Lade benutzerdefinierte Einstellungen
|
||||
require("custom.config")
|
||||
|
||||
-- Lade Spracheinstellungen
|
||||
require("custom.lsp")
|
||||
|
||||
1033
.config/nvim/init.lua.bak
Normal file
1033
.config/nvim/init.lua.bak
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,84 +1,39 @@
|
||||
{
|
||||
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||
"LazyVim": { "branch": "main", "commit": "3f034d0a7f58031123300309f2efd3bb0356ee21" },
|
||||
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "7823767e65bef7d30cc0acd6df89f3d2d7d420db" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
|
||||
"blink.cmp": { "branch": "main", "commit": "1c8d8e45d6fba3d11512f4762b1fdf906bffca42" },
|
||||
"catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" },
|
||||
"code_runner.nvim": { "branch": "main", "commit": "50a59cbc53e62cd6c171023935a19a79b4bf42fb" },
|
||||
"conform.nvim": { "branch": "master", "commit": "f9ef25a7ef00267b7d13bfc00b0dea22d78702d5" },
|
||||
"crates.nvim": { "branch": "main", "commit": "fd2bbca7aa588f24ffc3517831934b4c4a9588e9" },
|
||||
"LuaSnip": { "branch": "master", "commit": "776a29c3e1ac61029ac3f57ac6b5937df2340162" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"conform.nvim": { "branch": "master", "commit": "b529dd4897c85c3188cc787084089a9d55843093" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"fzf-lua": { "branch": "main", "commit": "aeff8132009a7fc55c6c43bca4288d5ba26a5393" },
|
||||
"gh-actions.nvim": { "branch": "main", "commit": "549286202a8fb7b5930e36e5962383049e4d5166" },
|
||||
"git-blame.nvim": { "branch": "master", "commit": "2883a7460f611c2705b23f12d58d398d5ce6ec00" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "6b1aca6018cb6ce18a46b9e8583074a2f820b51e" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "d0f90ef51d4be86b824b012ec52ed715b5622e51" },
|
||||
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
|
||||
"hydra.nvim": { "branch": "master", "commit": "3ced42c0b6a6c85583ff0f221635a7f4c1ab0dd0" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "444aad7977ee713a4049e9d1dd9b377967d67a4c" },
|
||||
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||
"material.nvim": { "branch": "main", "commit": "96285a62923ea8e38aea7b603099752da2a97e97" },
|
||||
"mini.ai": { "branch": "main", "commit": "978ffc65c6b513fde9ef075326d34d89197f1ea5" },
|
||||
"mini.files": { "branch": "main", "commit": "0a396f5ca5516a07959ae2c00667e1a26c20f0ea" },
|
||||
"mini.hipatterns": { "branch": "main", "commit": "fbf1e2195fdd65cf1bc970316c28098257728868" },
|
||||
"mini.icons": { "branch": "main", "commit": "ec61af6e606fc89ee3b1d8f2f20166a3ca917a36" },
|
||||
"mini.pairs": { "branch": "main", "commit": "1a3e73649c0eaef2f6c48ce1e761c6f0a7c11918" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "dda4c9e9a7806d72fab2c733462b9beb33a45714" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||
"neogit": { "branch": "master", "commit": "333968f8222fda475d3e4545a9b15fe9912ca26a" },
|
||||
"neotest": { "branch": "master", "commit": "dddbe8fe358b05b2b7e54fe4faab50563171a76d" },
|
||||
"neotest-go": { "branch": "main", "commit": "92950ad7be2ca02a41abca5c6600ff6ffaf5b5d6" },
|
||||
"neotest-mocha": { "branch": "main", "commit": "8239023d299a692784176f202f6a4a5e0a698ad2" },
|
||||
"neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" },
|
||||
"neotest-rust": { "branch": "main", "commit": "e1cb22ecf0341fb894ef2ebde344389fe6e6fc8e" },
|
||||
"neotest-vim-test": { "branch": "master", "commit": "75c4228882ae4883b11bfce9b8383e637eb44192" },
|
||||
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "a117163db44c256d53c3be8717f3e1a2a28e6299" },
|
||||
"nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "6522027785b305269fa17088395dfc0f456cedd2" },
|
||||
"nvim-dap": { "branch": "master", "commit": "6a5bba0ddea5d419a783e170c20988046376090d" },
|
||||
"nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "fb733ac734249ccf293e5c8018981d4d8f59fa8f" },
|
||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "b10436b9fb29d3c3c406c07ce813f70245f9bc7b" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "93b29a32d5f4be10e39226c6b796f28d68a8b483" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
|
||||
"one-small-step-for-vimkind": { "branch": "main", "commit": "b9def31568d20b16f7da9479a4174d165046fe8a" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" },
|
||||
"pipeline.nvim": { "branch": "main", "commit": "549286202a8fb7b5930e36e5962383049e4d5166" },
|
||||
"leap.nvim": { "branch": "main", "commit": "08ca7ec9e859856251d56c22ea107f82f563ff3c" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "c2682b0d9732bf52cbc34862056f143e71dc4a6d" },
|
||||
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "f3e8633f06007e015f855d3c1ec0cee23af14d8e" },
|
||||
"neogit": { "branch": "master", "commit": "00038cca54436b6fecc064bba00bf42b77189041" },
|
||||
"nui.nvim": { "branch": "main", "commit": "7cd18e73cfbd70e1546931b7268b3eebaeff9391" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-dap": { "branch": "master", "commit": "61643680dcb771a29073cd432894e2f81a7c2ae3" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "8adb3b5938f6074a1bcc36d3c3916f497d2e8ec4" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
|
||||
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
|
||||
"phpactor": { "branch": "master", "commit": "53741d8eb3d878d5b22e39f9255efa08c88d5dfc" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
|
||||
"refactoring.nvim": { "branch": "master", "commit": "36bd14ddd7ebf0546c15e6088e8bc93f8a98787d" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "448c76451ecf3c0edabcde427b7f1c8c219be2dd" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||
"tailwind-tools.nvim": { "branch": "master", "commit": "abe7368392345c53174979c2cf033e832de80ef8" },
|
||||
"schemastore.nvim": { "branch": "main", "commit": "9c4dbc346c0be7016cf56220bafb964fd8ef87d3" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "b80ec2c70ec4f32571478b501218c8979fab5201" },
|
||||
"telescope-terraform-doc.nvim": { "branch": "main", "commit": "28efe1f3cb2ed4c83fa69000ae8afd2f85d62826" },
|
||||
"telescope-terraform.nvim": { "branch": "main", "commit": "072c97023797ca1a874668aaa6ae0b74425335df" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
"ts-comments.nvim": { "branch": "main", "commit": "1bd9d0ba1d8b336c3db50692ffd0955fe1bb9f0c" },
|
||||
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" },
|
||||
"vim-test": { "branch": "master", "commit": "0f50a546aef59efe5f1301de8fa9819ecb9fd482" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "791dacfcfc8ccb7f6eb1c853050883b03e5a22fe" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
|
||||
"yanky.nvim": { "branch": "main", "commit": "a21a0b4f593e1fb17b17882f1ab3a3c1b943b831" },
|
||||
"typescript-tools.nvim": { "branch": "master", "commit": "3c501d7c7f79457932a8750a2a1476a004c5c1a9" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" }
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"extras": [
|
||||
"lazyvim.plugins.extras.lang.docker"
|
||||
],
|
||||
"install_version": 7,
|
||||
"news": {
|
||||
"NEWS.md": "10960"
|
||||
},
|
||||
"version": 8
|
||||
}
|
||||
BIN
.config/nvim/lua/.DS_Store
vendored
BIN
.config/nvim/lua/.DS_Store
vendored
Binary file not shown.
@@ -1,54 +0,0 @@
|
||||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Docs: https://www.lazyvim.org/configuration/general
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
-- Add any additional autocmds here
|
||||
|
||||
local function find_python_executable()
|
||||
if vim.env.VIRTUAL_ENV then
|
||||
local paths = vim.fn.glob(vim.env.VIRTUAL_ENV .. "/**/bin/python", true, true)
|
||||
local executable_path = table.concat(paths, ", ")
|
||||
if executable_path ~= "" then
|
||||
vim.api.nvim_echo({ { "Using path for python: " .. executable_path, "None" } }, false, {})
|
||||
return executable_path
|
||||
end
|
||||
elseif vim.fn.filereadable(".venv/bin/python") == 1 then
|
||||
local executable_path = vim.fn.expand(".venv/bin/python")
|
||||
vim.api.nvim_echo({ { "Using path for python: " .. executable_path, "None" } }, false, {})
|
||||
return executable_path
|
||||
end
|
||||
vim.api.nvim_echo({ { "No python executable found (see autocmds.lua)", "WarningMsg" } }, false, {})
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "python" },
|
||||
callback = function()
|
||||
vim.g.python3_host_prog = find_python_executable() -- python executable
|
||||
vim.opt_local.colorcolumn = "72,88" -- Ruler at column number
|
||||
vim.opt_local.tabstop = 4 -- Number of spaces tabs count for
|
||||
vim.opt_local.shiftwidth = 4 -- Size of an indent
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "rust" },
|
||||
callback = function()
|
||||
vim.opt_local.colorcolumn = "79" -- Ruler at column number
|
||||
vim.opt_local.tabstop = 4 -- Number of spaces tabs count for
|
||||
vim.opt_local.shiftwidth = 4 -- Size of an indent
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "typescript",
|
||||
callback = function()
|
||||
vim.opt_local.colorcolumn = "79" -- Ruler at column number
|
||||
vim.opt_local.tabstop = 4
|
||||
vim.opt_local.shiftwidth = 4
|
||||
end,
|
||||
})
|
||||
-- see lint.lua
|
||||
-- vim.api.nvim_create_autocmd({ "InsertLeave", "BufWritePost" }, {
|
||||
-- callback = function()
|
||||
-- require("lint").try_lint()
|
||||
-- end,
|
||||
-- })
|
||||
@@ -1,22 +0,0 @@
|
||||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Docs: https://www.lazyvim.org/configuration/general
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
|
||||
local Util = require("lazyvim.util")
|
||||
|
||||
local function map(mode, lhs, rhs, opts)
|
||||
local keys = require("lazy.core.handler").handlers.keys
|
||||
---@cast keys LazyKeysHandler
|
||||
-- do not create the keymap if a lazy keys handler exists
|
||||
if not keys.active[keys.parse({ lhs, mode = mode }).id] then
|
||||
opts = opts or {}
|
||||
opts.silent = opts.silent ~= false
|
||||
if opts.remap and not vim.g.vscode then
|
||||
opts.remap = nil
|
||||
end
|
||||
vim.keymap.set(mode, lhs, rhs, opts)
|
||||
end
|
||||
end
|
||||
|
||||
map("n", "<leader>bo", "<cmd>%bd|e#<cr>", { desc = "Close all buffers but the current one" })
|
||||
@@ -1,62 +0,0 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
-- bootstrap lazy.nvim
|
||||
-- stylua: ignore
|
||||
-- "git"
|
||||
vim.fn.system({"git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
|
||||
-- import any extras modules here
|
||||
-- { import = "lazyvim.plugins.extras.lang.docker" },
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||
{ import = "lazyvim.plugins.extras.lang.terraform" },
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
-- { import = "lazyvim.plugins.extras.formatting.prettier" },
|
||||
{ import = "lazyvim.plugins.extras.linting.eslint" },
|
||||
{ import = "lazyvim.plugins.extras.test.core" },
|
||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
||||
{ import = "lazyvim.plugins.extras.dap.nlua" },
|
||||
-- { import = "lazyvim.plugins.extras.coding.copilot" }, -- see ai.lua instead
|
||||
{ import = "lazyvim.plugins.extras.coding.yanky" },
|
||||
{ import = "lazyvim.plugins.extras.util.mini-hipatterns" },
|
||||
{ import = "lazyvim.plugins.extras.vscode" },
|
||||
{ import = "lazyvim.plugins.extras.editor.mini-files" },
|
||||
{ import = "lazyvim.plugins.extras.coding.luasnip" },
|
||||
{ import = "lazyvim.plugins.extras.lsp.none-ls" },
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "catppuccin" } },
|
||||
checker = { enabled = true }, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -1,12 +0,0 @@
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Docs: https://www.lazyvim.org/configuration/general
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
|
||||
vim.opt.listchars = "tab:▸ ,trail:·,nbsp:␣,extends:❯,precedes:❮" -- show symbols for whitespace
|
||||
vim.opt.relativenumber = false -- relative line numbers
|
||||
vim.opt.scrolloff = 10 -- keep 20 lines above and below the cursor
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
94
.config/nvim/lua/custom/config.lua
Normal file
94
.config/nvim/lua/custom/config.lua
Normal file
@@ -0,0 +1,94 @@
|
||||
-- Explorer-Konfiguration (Neo-tree)
|
||||
require('neo-tree').setup({
|
||||
close_if_last_window = false,
|
||||
popup_border_style = "rounded",
|
||||
enable_git_status = true,
|
||||
enable_diagnostics = true,
|
||||
sources = {
|
||||
"filesystem",
|
||||
"buffers",
|
||||
"git_status",
|
||||
},
|
||||
source_selector = {
|
||||
winbar = true,
|
||||
content_layout = "center",
|
||||
tabs_layout = "equal",
|
||||
},
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = true,
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = false,
|
||||
},
|
||||
follow_current_file = {
|
||||
enabled = true,
|
||||
},
|
||||
use_libuv_file_watcher = true,
|
||||
},
|
||||
window = {
|
||||
position = "right",
|
||||
width = 35,
|
||||
mapping_options = {
|
||||
noremap = true,
|
||||
nowait = true,
|
||||
},
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
added = "✚",
|
||||
modified = "",
|
||||
deleted = "✖",
|
||||
renamed = "➜",
|
||||
untracked = "★",
|
||||
ignored = "◌",
|
||||
unstaged = "✗",
|
||||
staged = "✓",
|
||||
conflict = "",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Harpoon (Schnellwechsel zwischen Dateien)
|
||||
local mark = require("harpoon.mark")
|
||||
local ui = require("harpoon.ui")
|
||||
|
||||
vim.keymap.set("n", "<leader>a", mark.add_file, { desc = "Datei zu Harpoon hinzufügen" })
|
||||
vim.keymap.set("n", "<leader>h", ui.toggle_quick_menu, { desc = "Harpoon-Menü anzeigen" })
|
||||
|
||||
-- Schnellzugriff auf die ersten 4 Dateien
|
||||
vim.keymap.set("n", "<leader>1", function() ui.nav_file(1) end, { desc = "Harpoon Datei 1" })
|
||||
vim.keymap.set("n", "<leader>2", function() ui.nav_file(2) end, { desc = "Harpoon Datei 2" })
|
||||
vim.keymap.set("n", "<leader>3", function() ui.nav_file(3) end, { desc = "Harpoon Datei 3" })
|
||||
vim.keymap.set("n", "<leader>4", function() ui.nav_file(4) end, { desc = "Harpoon Datei 4" })
|
||||
|
||||
-- Tastenkombinationen für Neo-tree
|
||||
vim.keymap.set("n", "<leader>e", ":Neotree toggle right<CR>", { silent = true, desc = "Explorer öffnen" })
|
||||
|
||||
-- Git Signs
|
||||
require('gitsigns').setup({
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
signcolumn = true,
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
|
||||
-- Navigation zwischen Änderungen
|
||||
vim.keymap.set('n', ']c', function()
|
||||
if vim.wo.diff then return ']c' end
|
||||
vim.schedule(function() gs.next_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true, buffer = bufnr })
|
||||
|
||||
vim.keymap.set('n', '[c', function()
|
||||
if vim.wo.diff then return '[c' end
|
||||
vim.schedule(function() gs.prev_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true, buffer = bufnr })
|
||||
end
|
||||
})
|
||||
183
.config/nvim/lua/custom/hydra.lua
Normal file
183
.config/nvim/lua/custom/hydra.lua
Normal file
@@ -0,0 +1,183 @@
|
||||
-- ~/.config/nvim/lua/custom/hydra.lua
|
||||
local Hydra = require('hydra')
|
||||
|
||||
-- Fenster-Management Hydra
|
||||
Hydra({
|
||||
name = 'Fenster',
|
||||
mode = 'n',
|
||||
body = '<C-w>',
|
||||
heads = {
|
||||
-- Navigieren zwischen Fenstern
|
||||
{ 'h', '<C-w>h', { desc = 'links' } },
|
||||
{ 'j', '<C-w>j', { desc = 'unten' } },
|
||||
{ 'k', '<C-w>k', { desc = 'oben' } },
|
||||
{ 'l', '<C-w>l', { desc = 'rechts' } },
|
||||
|
||||
-- Fenster verschieben
|
||||
{ 'H', '<C-w>H', { desc = 'nach links verschieben' } },
|
||||
{ 'J', '<C-w>J', { desc = 'nach unten verschieben' } },
|
||||
{ 'K', '<C-w>K', { desc = 'nach oben verschieben' } },
|
||||
{ 'L', '<C-w>L', { desc = 'nach rechts verschieben' } },
|
||||
|
||||
-- Größe ändern
|
||||
{ '>', '<C-w>>', { desc = 'breiter' } },
|
||||
{ '<', '<C-w><', { desc = 'schmaler' } },
|
||||
{ '+', '<C-w>+', { desc = 'höher' } },
|
||||
{ '-', '<C-w>-', { desc = 'niedriger' } },
|
||||
{ '=', '<C-w>=', { desc = 'gleiche Größe' } },
|
||||
|
||||
-- Neue Fenster
|
||||
{ 's', '<C-w>s', { desc = 'horizontal teilen' } },
|
||||
{ 'v', '<C-w>v', { desc = 'vertikal teilen' } },
|
||||
{ 'n', '<cmd>new<CR>', { desc = 'neue horizontale Teilung' } },
|
||||
{ 'N', '<cmd>vnew<CR>', { desc = 'neue vertikale Teilung' } },
|
||||
|
||||
-- Fenster schließen
|
||||
{ 'c', '<C-w>c', { desc = 'schließen' } },
|
||||
{ 'o', '<C-w>o', { desc = 'andere schließen' } },
|
||||
|
||||
-- Beenden
|
||||
{ 'q', nil, { desc = 'beenden', exit = true } },
|
||||
{ '<Esc>', nil, { desc = 'beenden', exit = true } },
|
||||
}
|
||||
})
|
||||
|
||||
-- Harpoon Hydra
|
||||
Hydra({
|
||||
name = 'Harpoon',
|
||||
mode = 'n',
|
||||
body = '<leader>h',
|
||||
heads = {
|
||||
{ 'a', function() require("harpoon.mark").add_file() end, { desc = 'Datei hinzufügen' } },
|
||||
{ 'h', function() require("harpoon.ui").toggle_quick_menu() end, { desc = 'Menü anzeigen' } },
|
||||
{ 'n', function() require("harpoon.ui").nav_next() end, { desc = 'Nächste Datei' } },
|
||||
{ 'p', function() require("harpoon.ui").nav_prev() end, { desc = 'Vorherige Datei' } },
|
||||
{ '1', function() require("harpoon.ui").nav_file(1) end, { desc = 'Datei 1' } },
|
||||
{ '2', function() require("harpoon.ui").nav_file(2) end, { desc = 'Datei 2' } },
|
||||
{ '3', function() require("harpoon.ui").nav_file(3) end, { desc = 'Datei 3' } },
|
||||
{ '4', function() require("harpoon.ui").nav_file(4) end, { desc = 'Datei 4' } },
|
||||
{ '5', function() require("harpoon.ui").nav_file(5) end, { desc = 'Datei 5' } },
|
||||
{ 'q', nil, { desc = 'beenden', exit = true } },
|
||||
{ '<Esc>', nil, { desc = 'beenden', exit = true } },
|
||||
}
|
||||
})
|
||||
|
||||
-- Git-Operationen Hydra (funktioniert mit Gitsigns und Neogit)
|
||||
Hydra({
|
||||
name = 'Git',
|
||||
mode = 'n',
|
||||
body = '<leader>g',
|
||||
heads = {
|
||||
-- Gitsigns
|
||||
{ 'h', function() require("gitsigns").preview_hunk() end, { desc = 'Änderung anzeigen' } },
|
||||
{ 'n', function() require("gitsigns").next_hunk() end, { desc = 'Nächste Änderung' } },
|
||||
{ 'p', function() require("gitsigns").prev_hunk() end, { desc = 'Vorherige Änderung' } },
|
||||
{ 's', function() require("gitsigns").stage_hunk() end, { desc = 'Änderung stagen' } },
|
||||
{ 'u', function() require("gitsigns").undo_stage_hunk() end, { desc = 'Stagen rückgängig' } },
|
||||
{ 'r', function() require("gitsigns").reset_hunk() end, { desc = 'Änderung zurücksetzen' } },
|
||||
|
||||
-- Neogit
|
||||
{ 'g', function() require("neogit").open() end, { desc = 'Neogit öffnen', exit = true } },
|
||||
{ 'c', function() require("neogit").open({ "commit" }) end, { desc = 'Commit', exit = true } },
|
||||
{ 'P', function() require("neogit").open({ "push" }) end, { desc = 'Push', exit = true } },
|
||||
{ 'l', function() require("neogit").open({ "log" }) end, { desc = 'Log', exit = true } },
|
||||
|
||||
-- Diffview
|
||||
{ 'd', '<cmd>DiffviewOpen<CR>', { desc = 'Diff anzeigen', exit = true } },
|
||||
|
||||
-- Beenden
|
||||
{ 'q', nil, { desc = 'beenden', exit = true } },
|
||||
{ '<Esc>', nil, { desc = 'beenden', exit = true } },
|
||||
}
|
||||
})
|
||||
|
||||
-- Neo-tree Hydra
|
||||
Hydra({
|
||||
name = 'Explorer',
|
||||
mode = 'n',
|
||||
body = '<leader>E',
|
||||
heads = {
|
||||
{ 'e', '<cmd>Neotree toggle right<CR>', { desc = 'Explorer ein/aus', exit = true } },
|
||||
{ 'f', '<cmd>Neotree focus filesystem right<CR>', { desc = 'Dateisystem', exit = true } },
|
||||
{ 'b', '<cmd>Neotree focus buffers right<CR>', { desc = 'Buffer', exit = true } },
|
||||
{ 'g', '<cmd>Neotree focus git_status right<CR>', { desc = 'Git-Status', exit = true } },
|
||||
|
||||
-- Leap Integration
|
||||
{ 's', function()
|
||||
-- Öffne Neo-tree und springe mit Leap
|
||||
vim.cmd('Neotree focus filesystem right')
|
||||
-- Eine kleine Verzögerung, damit Neo-tree Zeit hat, zu öffnen
|
||||
vim.defer_fn(function()
|
||||
require('leap').leap { target_windows = { vim.api.nvim_get_current_win() } }
|
||||
end, 100)
|
||||
end,
|
||||
{ desc = 'Suchen mit Leap', exit = true }
|
||||
},
|
||||
|
||||
-- Beenden
|
||||
{ 'q', nil, { desc = 'beenden', exit = true } },
|
||||
{ '<Esc>', nil, { desc = 'beenden', exit = true } },
|
||||
}
|
||||
})
|
||||
|
||||
-- LSP und Coding-Hydra
|
||||
Hydra({
|
||||
name = 'Code',
|
||||
mode = 'n',
|
||||
body = '<leader>c',
|
||||
heads = {
|
||||
-- LSP Aktionen
|
||||
{ 'a', vim.lsp.buf.code_action, { desc = 'Code-Aktion' } },
|
||||
{ 'r', vim.lsp.buf.rename, { desc = 'Umbenennen' } },
|
||||
{ 'd', vim.lsp.buf.definition, { desc = 'Definition', exit = true } },
|
||||
{ 'D', vim.lsp.buf.declaration, { desc = 'Deklaration', exit = true } },
|
||||
{ 'i', vim.lsp.buf.implementation, { desc = 'Implementation', exit = true } },
|
||||
{ 'h', vim.lsp.buf.hover, { desc = 'Hover Info' } },
|
||||
{ 'f', function() require('conform').format() end, { desc = 'Formatieren' } },
|
||||
|
||||
-- Diagnostik
|
||||
{ 'n', vim.diagnostic.goto_next, { desc = 'Nächster Fehler' } },
|
||||
{ 'p', vim.diagnostic.goto_prev, { desc = 'Vorheriger Fehler' } },
|
||||
{ 'l', vim.diagnostic.open_float, { desc = 'Fehler anzeigen' } },
|
||||
|
||||
-- Beenden
|
||||
{ 'q', nil, { desc = 'beenden', exit = true } },
|
||||
{ '<Esc>', nil, { desc = 'beenden', exit = true } },
|
||||
}
|
||||
})
|
||||
|
||||
-- Erweiterte Navigation mit Leap und Harpoon
|
||||
Hydra({
|
||||
name = 'Navigation',
|
||||
mode = 'n',
|
||||
body = '<leader>n',
|
||||
heads = {
|
||||
-- Leap
|
||||
{ 'f', function() require('leap').leap { target_windows = { vim.api.nvim_get_current_win() } } end,
|
||||
{ desc = 'Leap vorwärts', exit = true } },
|
||||
{ 'F', function() require('leap').leap { backward = true, target_windows = { vim.api.nvim_get_current_win() } } end,
|
||||
{ desc = 'Leap rückwärts', exit = true } },
|
||||
{ 'w', function()
|
||||
require('leap').leap { target_windows = vim.tbl_filter(
|
||||
function(win) return vim.api.nvim_win_get_config(win).relative == '' end,
|
||||
vim.api.nvim_list_wins()
|
||||
) }
|
||||
end, { desc = 'Leap alle Fenster', exit = true } },
|
||||
|
||||
-- Harpoon
|
||||
{ 'h', function() require("harpoon.ui").toggle_quick_menu() end, { desc = 'Harpoon-Menü', exit = true } },
|
||||
{ '1', function() require("harpoon.ui").nav_file(1) end, { desc = 'Harpoon 1', exit = true } },
|
||||
{ '2', function() require("harpoon.ui").nav_file(2) end, { desc = 'Harpoon 2', exit = true } },
|
||||
{ '3', function() require("harpoon.ui").nav_file(3) end, { desc = 'Harpoon 3', exit = true } },
|
||||
{ '4', function() require("harpoon.ui").nav_file(4) end, { desc = 'Harpoon 4', exit = true } },
|
||||
|
||||
-- Dateiexploration
|
||||
{ 'e', '<cmd>Neotree toggle right<CR>', { desc = 'Explorer', exit = true } },
|
||||
{ 't', '<cmd>Telescope find_files<CR>', { desc = 'Dateien suchen', exit = true } },
|
||||
{ 'g', '<cmd>Telescope live_grep<CR>', { desc = 'Inhalte suchen', exit = true } },
|
||||
|
||||
-- Beenden
|
||||
{ 'q', nil, { desc = 'beenden', exit = true } },
|
||||
{ '<Esc>', nil, { desc = 'beenden', exit = true } },
|
||||
}
|
||||
})
|
||||
280
.config/nvim/lua/custom/lsp.lua
Normal file
280
.config/nvim/lua/custom/lsp.lua
Normal file
@@ -0,0 +1,280 @@
|
||||
-- LSP und Treesitter Konfiguration
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||
|
||||
-- Mason für einfache LSP-Installation
|
||||
require('mason').setup()
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = {
|
||||
-- Sprachen
|
||||
'lua_ls', -- Lua
|
||||
'pyright', -- Python
|
||||
'ruff', -- Python Linter
|
||||
'ts_ls', -- TypeScript/JavaScript
|
||||
-- 'vue-language-server', -- Vue
|
||||
'intelephense', -- PHP
|
||||
'html', -- HTML
|
||||
'cssls', -- CSS
|
||||
'yamlls', -- YAML
|
||||
'jsonls', -- JSON
|
||||
'docker_compose_language_service', -- Docker Compose
|
||||
'dockerls', -- Dockerfile
|
||||
'gopls',
|
||||
},
|
||||
})
|
||||
|
||||
-- LSP-Server konfigurieren
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
-- Lua
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- TypeScript (inkl. React)
|
||||
lspconfig.ts_ls.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- Typescript-Tools für bessere TS/JS Unterstützung
|
||||
require("typescript-tools").setup({
|
||||
settings = {
|
||||
-- Für NestJS, React und andere TS-Frameworks
|
||||
tsserver_file_preferences = {
|
||||
importModuleSpecifierPreference = "relative",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Python
|
||||
lspconfig.pyright.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- PHP/Symfony
|
||||
lspconfig.intelephense.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
intelephense = {
|
||||
stubs = {
|
||||
"apache", "bcmath", "bz2", "calendar", "Core", "curl", "date", "dba",
|
||||
"dom", "fileinfo", "filter", "ftp", "gd", "gettext", "hash", "iconv",
|
||||
"imap", "intl", "json", "ldap", "libxml", "mbstring", "mysqli", "mysqlnd",
|
||||
"oci8", "openssl", "pcntl", "pcre", "PDO", "pdo_mysql", "pdo_pgsql",
|
||||
"pdo_sqlite", "pgsql", "Phar", "posix", "pspell", "readline", "Reflection",
|
||||
"session", "shmop", "SimpleXML", "snmp", "soap", "sockets", "sodium", "SPL",
|
||||
"sqlite3", "standard", "superglobals", "sysvmsg", "sysvsem", "sysvshm",
|
||||
"tidy", "tokenizer", "xml", "xmlreader", "xmlrpc", "xmlwriter", "xsl", "Zend OPcache",
|
||||
"zip", "zlib", "wordpress", "symfony"
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Go
|
||||
lspconfig.gopls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
gopls = {
|
||||
analyses = {
|
||||
unusedparams = true,
|
||||
},
|
||||
staticcheck = true,
|
||||
gofumpt = true, -- Strengere Formatierung als gofmt
|
||||
usePlaceholders = true,
|
||||
completeUnimported = true,
|
||||
experimentalPostfixCompletions = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- YAML mit Schema-Unterstützung
|
||||
lspconfig.yamlls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
yaml = {
|
||||
schemas = require('schemastore').yaml.schemas(),
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- JSON mit Schema-Unterstützung
|
||||
lspconfig.jsonls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require('schemastore').json.schemas(),
|
||||
validate = { enable = true },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Treesitter-Konfiguration für Syntax-Highlighting
|
||||
require('nvim-treesitter.configs').setup({
|
||||
ensure_installed = {
|
||||
"lua", "vim", "vimdoc", "json", "yaml", "html", "css",
|
||||
"javascript", "typescript", "tsx", "php", "python", "vue",
|
||||
"dockerfile", "markdown", "regex", "bash", "go",
|
||||
},
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
|
||||
-- Autocomplete-Konfiguration
|
||||
local cmp = require('cmp')
|
||||
local luasnip = require('luasnip')
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
}),
|
||||
})
|
||||
|
||||
-- Einfache benutzerdefinierte Snippets (optional)
|
||||
-- Hier ein Beispiel für ein paar einfache Snippets
|
||||
local snippets_path = vim.fn.stdpath("config") .. "/snippets"
|
||||
if vim.fn.isdirectory(snippets_path) == 0 then
|
||||
vim.fn.mkdir(snippets_path, "p")
|
||||
end
|
||||
|
||||
-- Füge einige nützliche Snippets hinzu
|
||||
luasnip.add_snippets("python", {
|
||||
luasnip.snippet("def", {
|
||||
luasnip.text_node("def "),
|
||||
luasnip.insert_node(1, "function_name"),
|
||||
luasnip.text_node("("),
|
||||
luasnip.insert_node(2, "args"),
|
||||
luasnip.text_node("):\n\t"),
|
||||
luasnip.insert_node(0),
|
||||
}),
|
||||
})
|
||||
|
||||
luasnip.add_snippets("typescript", {
|
||||
luasnip.snippet("fn", {
|
||||
luasnip.text_node("function "),
|
||||
luasnip.insert_node(1, "name"),
|
||||
luasnip.text_node("("),
|
||||
luasnip.insert_node(2, "params"),
|
||||
luasnip.text_node(") {\n\t"),
|
||||
luasnip.insert_node(0),
|
||||
luasnip.text_node("\n}"),
|
||||
}),
|
||||
})
|
||||
|
||||
luasnip.add_snippets("go", {
|
||||
luasnip.snippet("func", {
|
||||
luasnip.text_node("func "),
|
||||
luasnip.insert_node(1, "name"),
|
||||
luasnip.text_node("("),
|
||||
luasnip.insert_node(2, "params"),
|
||||
luasnip.text_node(") "),
|
||||
luasnip.insert_node(3, "returnType"),
|
||||
luasnip.text_node(" {\n\t"),
|
||||
luasnip.insert_node(0),
|
||||
luasnip.text_node("\n}"),
|
||||
}),
|
||||
luasnip.snippet("if", {
|
||||
luasnip.text_node("if "),
|
||||
luasnip.insert_node(1, "condition"),
|
||||
luasnip.text_node(" {\n\t"),
|
||||
luasnip.insert_node(0),
|
||||
luasnip.text_node("\n}"),
|
||||
}),
|
||||
})
|
||||
|
||||
-- Code-Formatierung
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
javascript = { "prettier" },
|
||||
typescript = { "prettier" },
|
||||
javascriptreact = { "prettier" },
|
||||
typescriptreact = { "prettier" },
|
||||
vue = { "prettier" },
|
||||
json = { "prettier" },
|
||||
yaml = { "prettier" },
|
||||
html = { "prettier" },
|
||||
css = { "prettier" },
|
||||
php = { "php_cs_fixer" },
|
||||
python = { "black" },
|
||||
lua = { "stylua" },
|
||||
go = { "gofumpt" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Formatierung beim Speichern
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
require("conform").format({ async = false, lsp_fallback = true })
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
-- Einstellungen für die Diagnostik (Fehleranzeige)
|
||||
vim.diagnostic.config({
|
||||
virtual_text = {
|
||||
format = function(diagnostic)
|
||||
local icon = "→ "
|
||||
if diagnostic.severity == vim.diagnostic.severity.ERROR then
|
||||
icon = "✗ "
|
||||
elseif diagnostic.severity == vim.diagnostic.severity.WARN then
|
||||
icon = "⚠ "
|
||||
elseif diagnostic.severity == vim.diagnostic.severity.INFO then
|
||||
icon = "ℹ "
|
||||
elseif diagnostic.severity == vim.diagnostic.severity.HINT then
|
||||
icon = "➤ "
|
||||
end
|
||||
return icon .. diagnostic.message
|
||||
end
|
||||
},
|
||||
signs = true, -- Symbole in der Randspalte anzeigen
|
||||
underline = true, -- Problematischen Code unterstreichen
|
||||
update_in_insert = false,
|
||||
severity_sort = true,
|
||||
float = {
|
||||
border = "rounded",
|
||||
source = "always",
|
||||
},
|
||||
})
|
||||
|
||||
-- Tastenkombinationen für Diagnostik
|
||||
vim.keymap.set('n', '<leader>cd', vim.diagnostic.open_float, { desc = 'Fehlerdetails anzeigen' })
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Vorheriger Fehler' })
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Nächster Fehler' })
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Fehler in Liste anzeigen' })
|
||||
449
.config/nvim/lua/custom/plugins.lua
Normal file
449
.config/nvim/lua/custom/plugins.lua
Normal file
@@ -0,0 +1,449 @@
|
||||
return {
|
||||
-- Fuzzy Finder
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
},
|
||||
},
|
||||
|
||||
-- LSP & Completion
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
'williamboman/mason.nvim',
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
'hrsh7th/nvim-cmp',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
'L3MON4D3/LuaSnip',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
'j-hui/fidget.nvim',
|
||||
},
|
||||
config = function()
|
||||
-- Nichts hier definieren - wir laden die Konfiguration aus der lsp.lua
|
||||
require("custom.lsp")
|
||||
end,
|
||||
},
|
||||
|
||||
-- Snipped
|
||||
{
|
||||
"rafamadriz/friendly-snippets",
|
||||
dependencies = {
|
||||
"L3MON4D3/LuaSnip",
|
||||
},
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end,
|
||||
},
|
||||
|
||||
-- Syntax Highlighting
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
},
|
||||
},
|
||||
|
||||
-- Datei-Explorer
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- Für Datei-Icons
|
||||
"MunifTanjim/nui.nvim", -- UI-Komponenten-Bibliothek
|
||||
},
|
||||
config = function()
|
||||
-- Standardkonfiguration deaktivieren
|
||||
vim.g.neo_tree_remove_legacy_commands = 1
|
||||
|
||||
require("neo-tree").setup({
|
||||
close_if_last_window = false, -- Neovim schließen, wenn nur noch Neo-tree offen ist?
|
||||
popup_border_style = "rounded", -- Stil für Popup-Fenster
|
||||
enable_git_status = true, -- Git-Integration aktivieren
|
||||
enable_diagnostics = true, -- Zeige Diagnostik-Informationen (LSP)
|
||||
|
||||
default_component_configs = {
|
||||
container = {
|
||||
enable_character_fade = true, -- Schöne Übergänge bei Textlängen
|
||||
width = "100%",
|
||||
right_padding = 0,
|
||||
},
|
||||
indent = {
|
||||
indent_size = 2,
|
||||
padding = 1,
|
||||
with_markers = true,
|
||||
indent_marker = "│",
|
||||
last_indent_marker = "└",
|
||||
highlight = "NeoTreeIndentMarker",
|
||||
with_expanders = true, -- Klick-/Tastatur-expandierbare Ordner
|
||||
expander_collapsed = "",
|
||||
expander_expanded = "",
|
||||
expander_highlight = "NeoTreeExpander",
|
||||
},
|
||||
icon = {
|
||||
folder_closed = "",
|
||||
folder_open = "",
|
||||
folder_empty = "",
|
||||
default = "*",
|
||||
highlight = "NeoTreeFileIcon"
|
||||
},
|
||||
modified = {
|
||||
symbol = "[+]",
|
||||
highlight = "NeoTreeModified",
|
||||
},
|
||||
name = {
|
||||
trailing_slash = false,
|
||||
use_git_status_colors = true,
|
||||
highlight = "NeoTreeFileName",
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
-- Symbole für Git-Status
|
||||
added = "✚", -- oder "✚"
|
||||
modified = "", -- oder "✹"
|
||||
deleted = "✖", -- oder ""
|
||||
renamed = "➜", -- oder ""
|
||||
untracked = "★", -- oder "✭"
|
||||
ignored = "◌", -- oder "◌"
|
||||
unstaged = "✗", -- oder "✗"
|
||||
staged = "✓", -- oder "✓"
|
||||
conflict = "", -- oder "≠"
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
-- Welche Ansichten verfügbar sein sollen
|
||||
source_selector = {
|
||||
winbar = true, -- Zeige Auswahl in der Fensterleiste
|
||||
statusline = false, -- Nicht in der Statuszeile anzeigen
|
||||
content_layout = "center",
|
||||
sources = { -- Verfügbare Quellen
|
||||
{ source = "filesystem", display_name = " Dateien " },
|
||||
{ source = "buffers", display_name = " Buffer " },
|
||||
{ source = "git_status", display_name = " Git " },
|
||||
},
|
||||
tabs_layout = "equal", -- "equal", "focus"
|
||||
},
|
||||
|
||||
-- Dateisystemansicht
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = true, -- Gefilterte Elemente mit anderen Stil anzeigen
|
||||
hide_dotfiles = false, -- Versteckte Dateien anzeigen
|
||||
hide_gitignored = false, -- Git-ignorierte Dateien anzeigen
|
||||
hide_hidden = false, -- Versteckte Dateien unter Windows anzeigen
|
||||
hide_by_name = {
|
||||
-- "node_modules", -- Auskommentieren, um zu verstecken
|
||||
},
|
||||
hide_by_pattern = {
|
||||
-- "*.meta", -- Auskommentieren, um zu verstecken
|
||||
},
|
||||
always_show = { -- Immer anzeigen, auch wenn sie sonst gefiltert würden
|
||||
".gitignored",
|
||||
".env",
|
||||
},
|
||||
never_show = { -- Dateien, die immer ausgeblendet werden
|
||||
".DS_Store",
|
||||
},
|
||||
never_show_by_pattern = { -- Regex-Muster für Dateien, die nie angezeigt werden
|
||||
-- ".*\\.meta$",
|
||||
},
|
||||
},
|
||||
follow_current_file = {
|
||||
enabled = true, -- Hervorheben der aktuellen Datei im Explorer
|
||||
leave_dirs_open = false, -- Ordner öffnen, wenn Datei darin
|
||||
},
|
||||
group_empty_dirs = false, -- Leere Unterordner unter Elternordner gruppieren
|
||||
hijack_netrw_behavior = "open_default", -- Netrw ersetzen
|
||||
use_libuv_file_watcher = true, -- Effiziente Dateiüberwachung (bemerkt Änderungen)
|
||||
|
||||
window = {
|
||||
mappings = {
|
||||
-- Tastenkombinationen im Dateisystem-Fenster
|
||||
["<space>"] = "none", -- Space für andere Funktionen freigeben
|
||||
["<2-LeftMouse>"] = "open",
|
||||
["<cr>"] = "open",
|
||||
["S"] = "open_split", -- In horizontales Split öffnen
|
||||
["s"] = "open_vsplit", -- In vertikales Split öffnen
|
||||
["t"] = "open_tabnew", -- In neuem Tab öffnen
|
||||
["C"] = "close_node", -- Knoten schließen
|
||||
["z"] = "close_all_nodes", -- Alle Knoten schließen
|
||||
["R"] = "refresh", -- Aktualisieren
|
||||
["a"] = {
|
||||
"add", -- Neue Datei/Ordner erstellen
|
||||
config = {
|
||||
show_path =
|
||||
"relative" -- Relativen Pfad beim Erstellen anzeigen
|
||||
}
|
||||
},
|
||||
["d"] = "delete", -- Löschen
|
||||
["r"] = "rename", -- Umbenennen
|
||||
["y"] = "copy_to_clipboard", -- In Zwischenablage kopieren
|
||||
["x"] = "cut_to_clipboard", -- Ausschneiden
|
||||
["p"] = "paste_from_clipboard", -- Einfügen
|
||||
["c"] = "copy", -- Kopieren (mit Ziel-Auswahl)
|
||||
["m"] = "move", -- Verschieben (mit Ziel-Auswahl)
|
||||
["/"] = "filter_on_submit", -- Filtern
|
||||
["<esc>"] = "clear_filter", -- Filter löschen
|
||||
["f"] = "filter_on_submit", -- Filtern (Alternative)
|
||||
["<c-x>"] = "clear_filter", -- Filter löschen (Alternative)
|
||||
["?"] = "show_help", -- Hilfe anzeigen
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
-- Buffer-Ansicht (Geöffnete Dateien)
|
||||
buffers = {
|
||||
follow_current_file = {
|
||||
enabled = true, -- Aktuelle Datei hervorheben
|
||||
},
|
||||
group_empty_dirs = true, -- Leere Ordner gruppieren
|
||||
show_unloaded = true, -- Auch nicht geladene Buffer anzeigen
|
||||
},
|
||||
|
||||
-- Git-Status-Ansicht
|
||||
git_status = {
|
||||
window = {
|
||||
mappings = {
|
||||
["A"] = "git_add_all", -- Alle Änderungen stagen
|
||||
["u"] = "git_unstage_file", -- Datei unstagen
|
||||
["a"] = "git_add_file", -- Datei stagen
|
||||
["r"] = "git_revert_file", -- Änderungen zurücksetzen
|
||||
["c"] = "git_commit", -- Commit erstellen
|
||||
["p"] = "git_push", -- Push
|
||||
["gg"] = "git_commit_and_push", -- Commit und Push
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
-- Hauptfenster-Konfiguration
|
||||
window = {
|
||||
position = "right", -- Explorer auf der rechten Seite
|
||||
width = 35, -- Breite des Explorers
|
||||
mapping_options = {
|
||||
noremap = true,
|
||||
nowait = true,
|
||||
},
|
||||
mappings = {
|
||||
["<space>"] = "none", -- Space für andere Funktionen freigeben
|
||||
["<2-LeftMouse>"] = "open",
|
||||
["<cr>"] = "open",
|
||||
["S"] = "open_split",
|
||||
["s"] = "open_vsplit",
|
||||
["t"] = "open_tabnew",
|
||||
["w"] = "open_with_window_picker", -- Mit Fensterauswahl öffnen
|
||||
["C"] = "close_node",
|
||||
["z"] = "close_all_nodes",
|
||||
["R"] = "refresh",
|
||||
["a"] = {
|
||||
"add",
|
||||
config = {
|
||||
show_path = "relative"
|
||||
}
|
||||
},
|
||||
["d"] = "delete",
|
||||
["r"] = "rename",
|
||||
["y"] = "copy_to_clipboard",
|
||||
["x"] = "cut_to_clipboard",
|
||||
["p"] = "paste_from_clipboard",
|
||||
["c"] = "copy",
|
||||
["m"] = "move",
|
||||
["q"] = "close_window", -- Fenster schließen
|
||||
["?"] = "show_help",
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
-- Tastenkombination zum Öffnen des Explorers
|
||||
vim.keymap.set("n", "<leader>e", ":Neotree toggle right<CR>",
|
||||
{ silent = true, desc = "Explorer ein/aus" })
|
||||
-- Tastenkombination für Dateiansicht
|
||||
vim.keymap.set("n", "<leader>ef", ":Neotree focus filesystem right<CR>",
|
||||
{ silent = true, desc = "Datei-Explorer" })
|
||||
-- Tastenkombination für Buffer-Liste
|
||||
vim.keymap.set("n", "<leader>eb", ":Neotree focus buffers right<CR>",
|
||||
{ silent = true, desc = "Buffer-Liste" })
|
||||
-- Tastenkombination für Git-Status
|
||||
vim.keymap.set("n", "<leader>eg", ":Neotree focus git_status right<CR>",
|
||||
{ silent = true, desc = "Git-Status" })
|
||||
end,
|
||||
},
|
||||
|
||||
-- Schnellwechsel zwischen Dateien (wie Harpoon)
|
||||
{
|
||||
'ThePrimeagen/harpoon',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
config = function()
|
||||
-- Basiseinstellungen für Harpoon
|
||||
require("harpoon").setup()
|
||||
|
||||
-- Einfache, direkte Keybindings
|
||||
vim.keymap.set("n", "<leader>a", require("harpoon.mark").add_file, { desc = "Datei markieren" })
|
||||
vim.keymap.set("n", "<leader>h", require("harpoon.ui").toggle_quick_menu,
|
||||
{ desc = "Harpoon-Menü" })
|
||||
vim.keymap.set("n", "<C-j>", function() require("harpoon.ui").nav_file(1) end)
|
||||
vim.keymap.set("n", "<C-k>", function() require("harpoon.ui").nav_file(2) end)
|
||||
vim.keymap.set("n", "<C-l>", function() require("harpoon.ui").nav_file(3) end)
|
||||
vim.keymap.set("n", "<C-;>", function() require("harpoon.ui").nav_file(4) end)
|
||||
end,
|
||||
},
|
||||
|
||||
-- Git-Integration
|
||||
{
|
||||
'lewis6991/gitsigns.nvim',
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- Formatierung
|
||||
{
|
||||
'stevearc/conform.nvim',
|
||||
},
|
||||
|
||||
-- Framework-Unterstützung
|
||||
|
||||
-- PHP/Symfony
|
||||
{
|
||||
'phpactor/phpactor',
|
||||
ft = 'php',
|
||||
build = 'composer install --no-dev -o',
|
||||
},
|
||||
|
||||
-- TypeScript/JavaScript/React/Vue/NestJS
|
||||
{
|
||||
'pmizio/typescript-tools.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'neovim/nvim-lspconfig',
|
||||
},
|
||||
config = function()
|
||||
require("typescript-tools").setup({
|
||||
settings = {
|
||||
tsserver_file_preferences = {
|
||||
importModuleSpecifierPreference = "relative",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- Vue.js
|
||||
-- {
|
||||
-- 'neovim/nvim-lspconfig',
|
||||
-- opts = function(_, opts)
|
||||
-- -- Füge Volar als Server hinzu
|
||||
-- opts.servers = opts.servers or {}
|
||||
-- opts.servers.volar = {
|
||||
-- filetypes = { 'vue', 'typescript', 'javascript' }
|
||||
-- }
|
||||
-- end,
|
||||
-- },
|
||||
|
||||
-- Playwright Testing
|
||||
{
|
||||
'mxsdev/nvim-dap',
|
||||
dependencies = {
|
||||
'rcarriga/nvim-dap-ui',
|
||||
'mfussenegger/nvim-dap-python',
|
||||
},
|
||||
},
|
||||
|
||||
-- YAML und JSON Unterstützung
|
||||
'b0o/schemastore.nvim',
|
||||
|
||||
-- Für Zen-Modus
|
||||
{
|
||||
"folke/zen-mode.nvim",
|
||||
cmd = "ZenMode",
|
||||
opts = {
|
||||
window = {
|
||||
width = 90,
|
||||
options = {
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Für Git-Integration
|
||||
{
|
||||
"sindrets/diffview.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
|
||||
-- Für Neogit
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"sindrets/diffview.nvim",
|
||||
},
|
||||
cmd = "Neogit",
|
||||
},
|
||||
|
||||
-- Für Farbvorschau in Code
|
||||
{
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
cmd = "ColorizerToggle",
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- Leap/Lightspeed
|
||||
{
|
||||
"ggandor/leap.nvim",
|
||||
config = function()
|
||||
require('leap').add_default_mappings()
|
||||
end,
|
||||
},
|
||||
|
||||
-- Hydra für kontextbezogene Tastaturmodi
|
||||
{
|
||||
"anuvyklack/hydra.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
-- Die Konfigurationen folgen im nächsten Schritt
|
||||
require("custom.hydra")
|
||||
end,
|
||||
},
|
||||
|
||||
-- Window-Picker
|
||||
{
|
||||
"s1n7ax/nvim-window-picker",
|
||||
version = "v2.*",
|
||||
config = function()
|
||||
require("window-picker").setup({
|
||||
filter_rules = {
|
||||
-- Filtere diese Fenstertypen aus
|
||||
bo = {
|
||||
filetype = { "neo-tree", "neo-tree-popup", "notify", "quickfix" },
|
||||
buftype = { "terminal" },
|
||||
},
|
||||
},
|
||||
highlights = {
|
||||
statusline = {
|
||||
focused = {
|
||||
fg = "#000000",
|
||||
bg = "#E35E4F",
|
||||
},
|
||||
unfocused = {
|
||||
fg = "#000000",
|
||||
bg = "#44CC41",
|
||||
},
|
||||
},
|
||||
},
|
||||
picker_config = {
|
||||
statusline_winbar_picker = {
|
||||
-- Verwende Buchstaben des Alphabets für die Fensterauswahl
|
||||
selection_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
5
.config/nvim/lua/custom/plugins/init.lua
Normal file
5
.config/nvim/lua/custom/plugins/init.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- You can add your own plugins here or in other files in this directory!
|
||||
-- I promise not to create any merge conflicts in this directory :)
|
||||
--
|
||||
-- See the kickstart.nvim README for more information
|
||||
return {}
|
||||
52
.config/nvim/lua/kickstart/health.lua
Normal file
52
.config/nvim/lua/kickstart/health.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
--[[
|
||||
--
|
||||
-- This file is not required for your own configuration,
|
||||
-- but helps people determine if their system is setup correctly.
|
||||
--
|
||||
--]]
|
||||
|
||||
local check_version = function()
|
||||
local verstr = tostring(vim.version())
|
||||
if not vim.version.ge then
|
||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||
return
|
||||
end
|
||||
|
||||
if vim.version.ge(vim.version(), '0.10-dev') then
|
||||
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
|
||||
else
|
||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||
end
|
||||
end
|
||||
|
||||
local check_external_reqs = function()
|
||||
-- Basic utils: `git`, `make`, `unzip`
|
||||
for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
|
||||
local is_executable = vim.fn.executable(exe) == 1
|
||||
if is_executable then
|
||||
vim.health.ok(string.format("Found executable: '%s'", exe))
|
||||
else
|
||||
vim.health.warn(string.format("Could not find executable: '%s'", exe))
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
return {
|
||||
check = function()
|
||||
vim.health.start 'kickstart.nvim'
|
||||
|
||||
vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
|
||||
|
||||
Fix only warnings for plugins and languages you intend to use.
|
||||
Mason will give warnings for languages that are not installed.
|
||||
You do not need to install, unless you want to use those languages!]]
|
||||
|
||||
local uv = vim.uv or vim.loop
|
||||
vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
|
||||
|
||||
check_version()
|
||||
check_external_reqs()
|
||||
end,
|
||||
}
|
||||
16
.config/nvim/lua/kickstart/plugins/autopairs.lua
Normal file
16
.config/nvim/lua/kickstart/plugins/autopairs.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
-- autopairs
|
||||
-- https://github.com/windwp/nvim-autopairs
|
||||
|
||||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
-- Optional dependency
|
||||
dependencies = { 'hrsh7th/nvim-cmp' },
|
||||
config = function()
|
||||
require('nvim-autopairs').setup {}
|
||||
-- If you want to automatically add `(` after selecting a function or method
|
||||
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
||||
local cmp = require 'cmp'
|
||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||
end,
|
||||
}
|
||||
148
.config/nvim/lua/kickstart/plugins/debug.lua
Normal file
148
.config/nvim/lua/kickstart/plugins/debug.lua
Normal file
@@ -0,0 +1,148 @@
|
||||
-- debug.lua
|
||||
--
|
||||
-- Shows how to use the DAP plugin to debug your code.
|
||||
--
|
||||
-- Primarily focused on configuring the debugger for Go, but can
|
||||
-- be extended to other languages as well. That's why it's called
|
||||
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
||||
|
||||
return {
|
||||
-- NOTE: Yes, you can install new plugins here!
|
||||
'mfussenegger/nvim-dap',
|
||||
-- NOTE: And you can specify dependencies as well
|
||||
dependencies = {
|
||||
-- Creates a beautiful debugger UI
|
||||
'rcarriga/nvim-dap-ui',
|
||||
|
||||
-- Required dependency for nvim-dap-ui
|
||||
'nvim-neotest/nvim-nio',
|
||||
|
||||
-- Installs the debug adapters for you
|
||||
'williamboman/mason.nvim',
|
||||
'jay-babu/mason-nvim-dap.nvim',
|
||||
|
||||
-- Add your own debuggers here
|
||||
'leoluz/nvim-dap-go',
|
||||
},
|
||||
keys = {
|
||||
-- Basic debugging keymaps, feel free to change to your liking!
|
||||
{
|
||||
'<F5>',
|
||||
function()
|
||||
require('dap').continue()
|
||||
end,
|
||||
desc = 'Debug: Start/Continue',
|
||||
},
|
||||
{
|
||||
'<F1>',
|
||||
function()
|
||||
require('dap').step_into()
|
||||
end,
|
||||
desc = 'Debug: Step Into',
|
||||
},
|
||||
{
|
||||
'<F2>',
|
||||
function()
|
||||
require('dap').step_over()
|
||||
end,
|
||||
desc = 'Debug: Step Over',
|
||||
},
|
||||
{
|
||||
'<F3>',
|
||||
function()
|
||||
require('dap').step_out()
|
||||
end,
|
||||
desc = 'Debug: Step Out',
|
||||
},
|
||||
{
|
||||
'<leader>b',
|
||||
function()
|
||||
require('dap').toggle_breakpoint()
|
||||
end,
|
||||
desc = 'Debug: Toggle Breakpoint',
|
||||
},
|
||||
{
|
||||
'<leader>B',
|
||||
function()
|
||||
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||
end,
|
||||
desc = 'Debug: Set Breakpoint',
|
||||
},
|
||||
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
|
||||
{
|
||||
'<F7>',
|
||||
function()
|
||||
require('dapui').toggle()
|
||||
end,
|
||||
desc = 'Debug: See last session result.',
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
|
||||
require('mason-nvim-dap').setup {
|
||||
-- Makes a best effort to setup the various debuggers with
|
||||
-- reasonable debug configurations
|
||||
automatic_installation = true,
|
||||
|
||||
-- You can provide additional configuration to the handlers,
|
||||
-- see mason-nvim-dap README for more information
|
||||
handlers = {},
|
||||
|
||||
-- You'll need to check that you have the required things installed
|
||||
-- online, please don't ask me how to install them :)
|
||||
ensure_installed = {
|
||||
-- Update this to ensure that you have the debuggers for the langs you want
|
||||
'delve',
|
||||
},
|
||||
}
|
||||
|
||||
-- Dap UI setup
|
||||
-- For more information, see |:help nvim-dap-ui|
|
||||
dapui.setup {
|
||||
-- Set icons to characters that are more likely to work in every terminal.
|
||||
-- Feel free to remove or use ones that you like more! :)
|
||||
-- Don't feel like these are good choices.
|
||||
icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
|
||||
controls = {
|
||||
icons = {
|
||||
pause = '⏸',
|
||||
play = '▶',
|
||||
step_into = '⏎',
|
||||
step_over = '⏭',
|
||||
step_out = '⏮',
|
||||
step_back = 'b',
|
||||
run_last = '▶▶',
|
||||
terminate = '⏹',
|
||||
disconnect = '⏏',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Change breakpoint icons
|
||||
-- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
|
||||
-- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
|
||||
-- local breakpoint_icons = vim.g.have_nerd_font
|
||||
-- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
|
||||
-- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' }
|
||||
-- for type, icon in pairs(breakpoint_icons) do
|
||||
-- local tp = 'Dap' .. type
|
||||
-- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
|
||||
-- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
|
||||
-- end
|
||||
|
||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||
|
||||
-- Install golang specific config
|
||||
require('dap-go').setup {
|
||||
delve = {
|
||||
-- On Windows delve must be run attached or it crashes.
|
||||
-- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring
|
||||
detached = vim.fn.has 'win32' == 0,
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
61
.config/nvim/lua/kickstart/plugins/gitsigns.lua
Normal file
61
.config/nvim/lua/kickstart/plugins/gitsigns.lua
Normal file
@@ -0,0 +1,61 @@
|
||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
-- NOTE: gitsigns is already included in init.lua but contains only the base
|
||||
-- config. This will add also the recommended keymaps.
|
||||
|
||||
return {
|
||||
{
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
on_attach = function(bufnr)
|
||||
local gitsigns = require 'gitsigns'
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map('n', ']c', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal { ']c', bang = true }
|
||||
else
|
||||
gitsigns.nav_hunk 'next'
|
||||
end
|
||||
end, { desc = 'Jump to next git [c]hange' })
|
||||
|
||||
map('n', '[c', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal { '[c', bang = true }
|
||||
else
|
||||
gitsigns.nav_hunk 'prev'
|
||||
end
|
||||
end, { desc = 'Jump to previous git [c]hange' })
|
||||
|
||||
-- Actions
|
||||
-- visual mode
|
||||
map('v', '<leader>hs', function()
|
||||
gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' }
|
||||
end, { desc = 'git [s]tage hunk' })
|
||||
map('v', '<leader>hr', function()
|
||||
gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' }
|
||||
end, { desc = 'git [r]eset hunk' })
|
||||
-- normal mode
|
||||
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
|
||||
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
|
||||
map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
|
||||
map('n', '<leader>hu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' })
|
||||
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
|
||||
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
|
||||
map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' })
|
||||
map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' })
|
||||
map('n', '<leader>hD', function()
|
||||
gitsigns.diffthis '@'
|
||||
end, { desc = 'git [D]iff against last commit' })
|
||||
-- Toggles
|
||||
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' })
|
||||
map('n', '<leader>tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' })
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
9
.config/nvim/lua/kickstart/plugins/indent_line.lua
Normal file
9
.config/nvim/lua/kickstart/plugins/indent_line.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
{ -- Add indentation guides even on blank lines
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||
-- See `:help ibl`
|
||||
main = 'ibl',
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
60
.config/nvim/lua/kickstart/plugins/lint.lua
Normal file
60
.config/nvim/lua/kickstart/plugins/lint.lua
Normal file
@@ -0,0 +1,60 @@
|
||||
return {
|
||||
|
||||
{ -- Linting
|
||||
'mfussenegger/nvim-lint',
|
||||
event = { 'BufReadPre', 'BufNewFile' },
|
||||
config = function()
|
||||
local lint = require 'lint'
|
||||
lint.linters_by_ft = {
|
||||
markdown = { 'markdownlint' },
|
||||
}
|
||||
|
||||
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||
-- instead set linters_by_ft like this:
|
||||
-- lint.linters_by_ft = lint.linters_by_ft or {}
|
||||
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
|
||||
--
|
||||
-- However, note that this will enable a set of default linters,
|
||||
-- which will cause errors unless these tools are available:
|
||||
-- {
|
||||
-- clojure = { "clj-kondo" },
|
||||
-- dockerfile = { "hadolint" },
|
||||
-- inko = { "inko" },
|
||||
-- janet = { "janet" },
|
||||
-- json = { "jsonlint" },
|
||||
-- markdown = { "vale" },
|
||||
-- rst = { "vale" },
|
||||
-- ruby = { "ruby" },
|
||||
-- terraform = { "tflint" },
|
||||
-- text = { "vale" }
|
||||
-- }
|
||||
--
|
||||
-- You can disable the default linters by setting their filetypes to nil:
|
||||
-- lint.linters_by_ft['clojure'] = nil
|
||||
-- lint.linters_by_ft['dockerfile'] = nil
|
||||
-- lint.linters_by_ft['inko'] = nil
|
||||
-- lint.linters_by_ft['janet'] = nil
|
||||
-- lint.linters_by_ft['json'] = nil
|
||||
-- lint.linters_by_ft['markdown'] = nil
|
||||
-- lint.linters_by_ft['rst'] = nil
|
||||
-- lint.linters_by_ft['ruby'] = nil
|
||||
-- lint.linters_by_ft['terraform'] = nil
|
||||
-- lint.linters_by_ft['text'] = nil
|
||||
|
||||
-- Create autocommand which carries out the actual linting
|
||||
-- on the specified events.
|
||||
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
-- Only run the linter in buffers that you can modify in order to
|
||||
-- avoid superfluous noise, notably within the handy LSP pop-ups that
|
||||
-- describe the hovered symbol using Markdown.
|
||||
if vim.opt_local.modifiable:get() then
|
||||
lint.try_lint()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
25
.config/nvim/lua/kickstart/plugins/neo-tree.lua
Normal file
25
.config/nvim/lua/kickstart/plugins/neo-tree.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
-- Neo-tree is a Neovim plugin to browse the file system
|
||||
-- https://github.com/nvim-neo-tree/neo-tree.nvim
|
||||
|
||||
return {
|
||||
'nvim-neo-tree/neo-tree.nvim',
|
||||
version = '*',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
||||
'MunifTanjim/nui.nvim',
|
||||
},
|
||||
cmd = 'Neotree',
|
||||
keys = {
|
||||
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
|
||||
},
|
||||
opts = {
|
||||
filesystem = {
|
||||
window = {
|
||||
mappings = {
|
||||
['\\'] = 'close_window',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,180 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
optional = true,
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
local icons = require("lazyvim.config").icons
|
||||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
options = {
|
||||
theme = "catppuccin",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
globalstatus = true,
|
||||
disabled_filetypes = { statusline = { "dashboard", "alpha" } },
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch" },
|
||||
lualine_c = {
|
||||
{
|
||||
"diagnostics",
|
||||
symbols = {
|
||||
error = icons.diagnostics.Error,
|
||||
warn = icons.diagnostics.Warn,
|
||||
info = icons.diagnostics.Info,
|
||||
hint = icons.diagnostics.Hint,
|
||||
},
|
||||
},
|
||||
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
|
||||
{ "filename", path = 1, symbols = { modified = " ", readonly = "", unnamed = "" } },
|
||||
-- stylua: ignore
|
||||
{
|
||||
function() return require("nvim-navic").get_location() end,
|
||||
cond = function() return package.loaded["nvim-navic"] and require("nvim-navic").is_available() end,
|
||||
},
|
||||
},
|
||||
lualine_x = {
|
||||
-- stylua: ignore
|
||||
{
|
||||
function() return require("noice").api.status.command.get() end,
|
||||
cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end,
|
||||
color = Util.ui.fg("Statement"),
|
||||
},
|
||||
-- stylua: ignore
|
||||
{
|
||||
function() return require("noice").api.status.mode.get() end,
|
||||
cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end,
|
||||
color = Util.ui.fg("Constant"),
|
||||
},
|
||||
-- stylua: ignore
|
||||
{
|
||||
function() return " " .. require("dap").status() end,
|
||||
cond = function () return package.loaded["dap"] and require("dap").status() ~= "" end,
|
||||
color = Util.ui.fg("Debug"),
|
||||
},
|
||||
{
|
||||
require("lazy.status").updates,
|
||||
cond = require("lazy.status").has_updates,
|
||||
color = Util.ui.fg("Special"),
|
||||
},
|
||||
{
|
||||
"diff",
|
||||
symbols = {
|
||||
added = icons.git.added,
|
||||
modified = icons.git.modified,
|
||||
removed = icons.git.removed,
|
||||
},
|
||||
},
|
||||
},
|
||||
lualine_y = {
|
||||
{ "progress", separator = " ", padding = { left = 1, right = 0 } },
|
||||
{ "location", padding = { left = 0, right = 1 } },
|
||||
},
|
||||
lualine_z = {
|
||||
function()
|
||||
return " " .. os.date("%R")
|
||||
end,
|
||||
},
|
||||
},
|
||||
extensions = { "neo-tree", "lazy" },
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- custom config which piggybacks on the copilot extras in lazy.lua.
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
enabled = false,
|
||||
cmd = "Copilot",
|
||||
build = ":Copilot auth",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("copilot").setup({
|
||||
panel = {
|
||||
enabled = true,
|
||||
auto_refresh = true,
|
||||
},
|
||||
suggestion = {
|
||||
enabled = true,
|
||||
auto_trigger = true,
|
||||
accept = false, -- disable built-in keymapping
|
||||
},
|
||||
})
|
||||
|
||||
-- hide copilot suggestions when cmp menu is open
|
||||
-- to prevent odd behavior/garbled up suggestions
|
||||
local cmp_status_ok, cmp = pcall(require, "cmp")
|
||||
if cmp_status_ok then
|
||||
cmp.event:on("menu_opened", function()
|
||||
vim.b.copilot_suggestion_hidden = true
|
||||
end)
|
||||
|
||||
cmp.event:on("menu_closed", function()
|
||||
vim.b.copilot_suggestion_hidden = false
|
||||
end)
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
{
|
||||
"jellydn/CopilotChat.nvim",
|
||||
enabled = false,
|
||||
dependencies = { "zbirenbaum/copilot.lua" }, -- Or { "github/copilot.vim" }
|
||||
opts = {
|
||||
mode = "split", -- newbuffer or split , default: newbuffer
|
||||
debug = false, -- Enable or disable debug mode, the log file will be in ~/.local/state/nvim/CopilotChat.nvim.log
|
||||
},
|
||||
build = function()
|
||||
vim.defer_fn(function()
|
||||
vim.cmd("UpdateRemotePlugins")
|
||||
vim.notify("CopilotChat - Updated remote plugins. Please restart Neovim.")
|
||||
end, 3000)
|
||||
end,
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{ "<leader>cce", "<cmd>CopilotChatExplain<cr>", desc = "CopilotChat - Explain code" },
|
||||
{ "<leader>cct", "<cmd>CopilotChatTests<cr>", desc = "CopilotChat - Generate tests" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- copilot status in lualine
|
||||
-- this is taken from the copilot lazyvim extras at:
|
||||
-- https://www.lazyvim.org/plugins/extras/coding.copilot
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
enabled = false,
|
||||
optional = true,
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
local Util = require("lazyvim.util").ui
|
||||
local colors = {
|
||||
[""] = Util.fg("Special"),
|
||||
["Normal"] = Util.fg("Special"),
|
||||
["Warning"] = Util.fg("DiagnosticError"),
|
||||
["InProgress"] = Util.fg("DiagnosticWarn"),
|
||||
}
|
||||
table.insert(opts.sections.lualine_x, 2, {
|
||||
function()
|
||||
local icon = require("lazyvim.config").icons.kinds.Copilot
|
||||
local status = require("copilot.api").status.data
|
||||
return icon .. (status.message or "")
|
||||
end,
|
||||
cond = function()
|
||||
local ok, clients = pcall(vim.lsp.get_active_clients, { name = "copilot", bufnr = 0 })
|
||||
return ok and #clients > 0
|
||||
end,
|
||||
color = function()
|
||||
if not package.loaded["copilot"] then
|
||||
return
|
||||
end
|
||||
local status = require("copilot.api").status.data
|
||||
return colors[status.status] or colors[""]
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
enable_check_bracket_line = true,
|
||||
},
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
return {
|
||||
|
||||
-- nvim-cmp configuration so to not preselect completion and require tab to select
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-emoji",
|
||||
opts = nil,
|
||||
},
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local luasnip = require("luasnip")
|
||||
local cmp = require("cmp")
|
||||
|
||||
opts.mapping = vim.tbl_extend("force", opts.mapping, {
|
||||
["<CR>"] = vim.NIL,
|
||||
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })
|
||||
elseif require("copilot.suggestion").is_visible() then
|
||||
require("copilot.suggestion").accept()
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
})
|
||||
opts.preselect = cmp.PreselectMode.None
|
||||
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"CRAG666/code_runner.nvim",
|
||||
config = function()
|
||||
require("code_runner").setup({
|
||||
focus = false,
|
||||
|
||||
filetype = {
|
||||
go = {
|
||||
"go run",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
keys = { { "<leader>rf", "<cmd>RunFile term<cr>", desc = "Run file" } },
|
||||
},
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
return {
|
||||
|
||||
-- NOTE: also see treesitter.lua for languages with improved syntax highlighting
|
||||
|
||||
-- NOTE: colorschemes already installed in LazyVim: https://www.lazyvim.org/plugins/colorscheme
|
||||
|
||||
-- set the colorscheme
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
-- lazy = false,
|
||||
opts = {
|
||||
-- colorscheme = "dracula-dark",
|
||||
colorscheme = "tokyonight-storm",
|
||||
-- colorscheme = "tokyonight-night",
|
||||
-- colorscheme = "tokyonight-moon",
|
||||
-- colorscheme = "tokyonight-day",
|
||||
-- colorscheme = "catppuccin",
|
||||
-- colorscheme = "catppuccin-macchiato",
|
||||
-- colorscheme = "catppuccin-mocha",
|
||||
-- colorscheme = "catppuccin-frappe",
|
||||
-- colorscheme = "catppuccin-latte",
|
||||
-- colorscheme = "material",
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
-- lazy = false,
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
opts = {
|
||||
flavor = "mocha",
|
||||
transparent_background = true,
|
||||
integrations = {
|
||||
gitsigns = true,
|
||||
telescope = true,
|
||||
neogit = true,
|
||||
nvimtree = true,
|
||||
indent_blankline = true,
|
||||
dashboard = true,
|
||||
which_key = true,
|
||||
mini = true,
|
||||
harpoon = true,
|
||||
notify = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"marko-cerovac/material.nvim",
|
||||
priority = 1000,
|
||||
opts = {
|
||||
contrast = {
|
||||
terminal = false,
|
||||
sidebars = false,
|
||||
floating_windows = false,
|
||||
cursor_line = false,
|
||||
},
|
||||
style = "deep ocean", -- Verfügbare Stile: "darker", "lighter", "oceanic", "palenight", "deep ocean"
|
||||
transparent = true, -- Macht den Hintergrund transparent
|
||||
lualine_style = "default", -- oder "stealth" für einen minimalistischeren Look
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
return {
|
||||
|
||||
{ "goolord/alpha-nvim", enabled = true },
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
-- See https://www.lazyvim.org/plugins/extras/dap.core
|
||||
-- and test.lua for keymaps
|
||||
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = function(_, opts)
|
||||
local ensure_installed = {
|
||||
-- python
|
||||
"debugpy",
|
||||
|
||||
-- see lazy.lua for LazyVim extras
|
||||
}
|
||||
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, ensure_installed)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"mfussenegger/nvim-dap-python",
|
||||
dependencies = {
|
||||
"mfussenegger/nvim-dap",
|
||||
},
|
||||
ft = { "python" },
|
||||
config = function()
|
||||
local dap_python = require("dap-python")
|
||||
|
||||
local function find_debugpy_python_path()
|
||||
-- Return the path to the debugpy python executable if it is
|
||||
-- installed in $VIRTUAL_ENV, otherwise get it from Mason
|
||||
if vim.env.VIRTUAL_ENV then
|
||||
local paths = vim.fn.glob(vim.env.VIRTUAL_ENV .. "/**/debugpy", true, true)
|
||||
if table.concat(paths, ", ") ~= "" then
|
||||
return vim.env.VIRTUAL_ENV .. "/bin/python"
|
||||
end
|
||||
end
|
||||
|
||||
local mason_registry = require("mason-registry")
|
||||
local path = mason_registry.get_package("debugpy"):get_install_path() .. "/venv/bin/python"
|
||||
return path
|
||||
end
|
||||
|
||||
local dap_python_path = find_debugpy_python_path()
|
||||
vim.api.nvim_echo({ { "Using path for dap-python: " .. dap_python_path, "None" } }, false, {})
|
||||
|
||||
dap_python.setup(dap_python_path)
|
||||
end,
|
||||
},
|
||||
|
||||
-- extend Go extras setup from lazy.lua, with DAP capability
|
||||
-- also see https://github.com/LazyVim/LazyVim/pull/1115
|
||||
{
|
||||
"leoluz/nvim-dap-go",
|
||||
dependencies = {
|
||||
{ "mfussenegger/nvim-dap" },
|
||||
},
|
||||
ft = { "go" },
|
||||
config = true,
|
||||
keys = {
|
||||
-- workaround, as nvim-dap-go does not have a DAP strategy set up for neotest
|
||||
-- see https://github.com/nvim-neotest/neotest-go/issues/12
|
||||
{ "<leader>tg", "<cmd>lua require('dap-go').debug_test()<CR>", desc = "Debug Nearest (Go)" },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,267 +0,0 @@
|
||||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under config.plugins will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- add symbols-outline
|
||||
{
|
||||
"simrat39/symbols-outline.nvim",
|
||||
cmd = "SymbolsOutline",
|
||||
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local cmp = require("cmp")
|
||||
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>fp",
|
||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||
desc = "Find Plugin File",
|
||||
},
|
||||
},
|
||||
-- change some options
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = { prompt_position = "top" },
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add telescope-fzf-native
|
||||
{
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
config = function()
|
||||
require("telescope").load_extension("fzf")
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"help",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, "😄")
|
||||
end,
|
||||
},
|
||||
|
||||
-- or you can return new options to override all the defaults
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
--[[add your custom lualine config here]]
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore ans setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Use <tab> for completion and snippets (supertab)
|
||||
-- first: disable default <tab> and <s-tab> behavior in LuaSnip
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
keys = function()
|
||||
return {}
|
||||
end,
|
||||
},
|
||||
-- then: setup supertab in cmp
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-emoji",
|
||||
},
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local luasnip = require("luasnip")
|
||||
local cmp = require("cmp")
|
||||
|
||||
opts.mapping = vim.tbl_extend("force", opts.mapping, {
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
||||
-- they way you will only jump inside the snippet region
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
return {
|
||||
|
||||
-- change neo-tree confi
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = {
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = true, -- when true, they will just be displayed differently than normal items
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = true,
|
||||
},
|
||||
|
||||
-- This will use the OS level file watchers to detect changes
|
||||
-- instead of relying on nvim autocmd events.
|
||||
use_libuv_file_watcher = true,
|
||||
},
|
||||
window = {
|
||||
position = "right",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
return {
|
||||
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
|
||||
opts = function(_, opts)
|
||||
local ensure_installed = {
|
||||
-- python
|
||||
"black",
|
||||
|
||||
-- lua
|
||||
"stylua",
|
||||
|
||||
-- shell
|
||||
"shfmt",
|
||||
|
||||
-- yaml
|
||||
"yamlfix",
|
||||
"yamlfmt",
|
||||
|
||||
-- rust
|
||||
-- rustfmt via rustup
|
||||
|
||||
-- see lazy.lua for LazyVim extras
|
||||
}
|
||||
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, ensure_installed)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"mhartington/formatter.nvim",
|
||||
enabled = false, -- let's see what happens with null-ls and LazyVim
|
||||
config = function()
|
||||
local formatter = require("formatter")
|
||||
formatter.setup({
|
||||
filetype = {
|
||||
lua = {
|
||||
require("formatter.filetypes.lua").stylua,
|
||||
},
|
||||
python = {
|
||||
require("formatter.filetypes.python").black,
|
||||
},
|
||||
sh = {
|
||||
require("formatter.filetypes.sh").shfmt,
|
||||
},
|
||||
yaml = {
|
||||
require("formatter.filetypes.yaml").yamlfix,
|
||||
require("formatter.filetypes.yaml").yamlfmt,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
opts = {}, -- this is equalent to setup({}) function
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
return {
|
||||
-- Formatting
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
javascript = { "prettier" },
|
||||
typescript = { "prettier" },
|
||||
javascriptreact = { "prettier" },
|
||||
typescriptreact = { "prettier" },
|
||||
},
|
||||
formatters = {
|
||||
prettier = {
|
||||
prepend_args = { "--tab-width", "2", "--single-quote", "--trailing-comma", "all" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- Linting
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
optional = true,
|
||||
opts = {
|
||||
linters_by_ft = {
|
||||
javascript = { "eslint" },
|
||||
typescript = { "eslint" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
return {
|
||||
|
||||
{
|
||||
"sindrets/diffview.nvim",
|
||||
dependencies = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-tree/nvim-web-devicons" },
|
||||
},
|
||||
lazy = false,
|
||||
config = function()
|
||||
-- vim.opt.fillchars = "diff:╱"
|
||||
vim.opt.fillchars = "diff:░"
|
||||
|
||||
require("diffview").setup({
|
||||
enhanced_diff_hl = true, -- See ':h diffview-config-enhanced_diff_hl'
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
-- use [c and [c to navigate diffs (vim built in), see :h jumpto-diffs
|
||||
-- use ]x and [x to navigate conflicts
|
||||
{ "<leader>gdc", ":DiffviewOpen origin/main...HEAD", desc = "Compare commits" },
|
||||
{ "<leader>gdd", ":DiffviewClose<CR>", desc = "Close Diffview tab" },
|
||||
{ "<leader>gdh", ":DiffviewFileHistory %<CR>", desc = "File history" },
|
||||
{ "<leader>gdH", ":DiffviewFileHistory<CR>", desc = "Repo history" },
|
||||
{ "<leader>gdm", ":DiffviewOpen<CR>", desc = "Solve merge conflicts" },
|
||||
{ "<leader>gdo", ":DiffviewOpen main", desc = "DiffviewOpen" },
|
||||
{ "<leader>gdp", ":DiffviewOpen origin/main...HEAD --imply-local", desc = "Review current PR" },
|
||||
{
|
||||
"<leader>gdP",
|
||||
":DiffviewFileHistory --range=origin/main...HEAD --right-only --no-merges",
|
||||
desc = "Review current PR (per commit)",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"f-person/git-blame.nvim",
|
||||
keys = {
|
||||
-- toggle needs to be called twice; https://github.com/f-person/git-blame.nvim/issues/16
|
||||
{ "<leader>gbe", ":GitBlameEnable<CR>", desc = "Blame line (enable)" },
|
||||
{ "<leader>gbd", ":GitBlameDisable<CR>", desc = "Blame line (disable)" },
|
||||
{ "<leader>gbs", ":GitBlameCopySHA<CR>", desc = "Copy SHA" },
|
||||
{ "<leader>gbc", ":GitBlameCopyCommitURL<CR>", desc = "Copy commit URL" },
|
||||
{ "<leader>gbf", ":GitBlameCopyFileURL<CR>", desc = "Copy file URL" },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
},
|
||||
|
||||
{
|
||||
"topaxi/gh-actions.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim", "MunifTanjim/nui.nvim" },
|
||||
build = "make",
|
||||
cmd = "GhActions",
|
||||
keys = {
|
||||
{ "<leader>ga", "<cmd>GhActions<cr>", desc = "Open Github Actions" },
|
||||
},
|
||||
-- optional, you can also install and use `yq` instead.
|
||||
config = function(_, opts)
|
||||
require("gh-actions").setup(opts)
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- required
|
||||
"nvim-telescope/telescope.nvim", -- optional
|
||||
"sindrets/diffview.nvim", -- optional
|
||||
"ibhagwan/fzf-lua", -- optional
|
||||
},
|
||||
config = true,
|
||||
},
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
return {
|
||||
|
||||
{
|
||||
"ThePrimeagen/harpoon",
|
||||
dependencies = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-telescope/telescope.nvim" },
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>hh", ":lua require('harpoon.ui').toggle_quick_menu()<CR>", desc = "Harpoon menu" },
|
||||
-- { "<leader>ht", ":Telescope harpoon marks<CR>", desc = "Telescope menu" },
|
||||
|
||||
{ "<leader>ha", ":lua require('harpoon.mark').add_file()<CR>", desc = "Add file as marked" },
|
||||
{ "<leader>hn", ":lua require('harpoon.ui').nav_next()<CR>", desc = "Next file" },
|
||||
{ "<leader>hp", ":lua require('harpoon.ui').nav_prev()<CR>", desc = "Previous file" },
|
||||
{ "<leader>ht", ":lua require('harpoon.term').gotoTerminal(1)<CR>", desc = "Terminal" },
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("harpoon")
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
return {
|
||||
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
|
||||
opts = function(_, opts)
|
||||
local ensure_installed = {
|
||||
-- python
|
||||
"mypy",
|
||||
|
||||
-- lua
|
||||
"luacheck",
|
||||
|
||||
-- shell
|
||||
"shellcheck",
|
||||
|
||||
-- yaml
|
||||
"yamllint",
|
||||
|
||||
-- sql
|
||||
"sqlfluff",
|
||||
|
||||
-- markdown
|
||||
"vale",
|
||||
|
||||
-- see lazy.lua for LazyVim extras
|
||||
}
|
||||
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, ensure_installed)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
-- NOTE: autocmd is required, see autocmds.lua
|
||||
"mfussenegger/nvim-lint",
|
||||
enabled = false, -- let's see what happens with null-ls and LazyVim
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
lint.linters_by_ft = {
|
||||
python = { "mypy" },
|
||||
lua = { "luacheck" },
|
||||
yaml = { "yamllint" },
|
||||
sh = { "shellcheck" },
|
||||
sql = { "sqlfluff" },
|
||||
markdown = { "vale" },
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
-- https://www.lazyvim.org/plugins/lsp
|
||||
|
||||
return {
|
||||
|
||||
-- change mason config
|
||||
-- note: don't forget to update treesitter for languages
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
|
||||
opts = function(_, opts)
|
||||
local ensure_installed = {
|
||||
-- python
|
||||
"ruff-lsp",
|
||||
"pyright",
|
||||
|
||||
-- lua
|
||||
"lua-language-server",
|
||||
|
||||
-- shell
|
||||
"bash-language-server",
|
||||
|
||||
-- docker
|
||||
"dockerfile-language-server",
|
||||
|
||||
-- rust
|
||||
"rust-analyzer",
|
||||
|
||||
--svelte
|
||||
"svelte-language-server",
|
||||
|
||||
-- vue
|
||||
"vue-language-server",
|
||||
|
||||
-- php
|
||||
"intelephense",
|
||||
-- see lazy.lua for LazyVim extras
|
||||
}
|
||||
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, ensure_installed)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
dependencies = { "mason.nvim" },
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = function(_, opts)
|
||||
local null_ls = require("null-ls")
|
||||
local formatting = null_ls.builtins.formatting
|
||||
local diagnostics = null_ls.builtins.diagnostics
|
||||
local code_actions = null_ls.builtins.code_actions
|
||||
|
||||
-- null_ls.setup({
|
||||
-- debug = false, -- Turn on debug for :NullLsLog
|
||||
-- -- diagnostics_format = "#{m} #{s}[#{c}]",
|
||||
-- })
|
||||
|
||||
local function prefer_bin_from_venv(executable_name)
|
||||
-- Return the path to the executable if $VIRTUAL_ENV is set and the binary exists somewhere beneath the $VIRTUAL_ENV path, otherwise get it from Mason
|
||||
if vim.env.VIRTUAL_ENV then
|
||||
local paths = vim.fn.glob(vim.env.VIRTUAL_ENV .. "/**/bin/" .. executable_name, true, true)
|
||||
local executable_path = table.concat(paths, ", ")
|
||||
if executable_path ~= "" then
|
||||
-- vim.api.nvim_echo(
|
||||
-- { { "Using path for " .. executable_name .. ": " .. executable_path, "None" } },
|
||||
-- false,
|
||||
-- {}
|
||||
-- )
|
||||
return executable_path
|
||||
end
|
||||
end
|
||||
|
||||
local mason_registry = require("mason-registry")
|
||||
local mason_path = mason_registry.get_package(executable_name):get_install_path()
|
||||
.. "/venv/bin/"
|
||||
.. executable_name
|
||||
-- vim.api.nvim_echo({ { "Using Mason for " .. executable_name .. ": " .. mason_path, "None" } }, false, {})
|
||||
return mason_path
|
||||
end
|
||||
|
||||
local sources = {
|
||||
-- list of supported sources:
|
||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md
|
||||
|
||||
diagnostics.mypy.with({
|
||||
filetypes = { "python" },
|
||||
command = prefer_bin_from_venv("mypy"),
|
||||
}),
|
||||
formatting.black.with({
|
||||
filetypes = { "python" },
|
||||
command = prefer_bin_from_venv("black"),
|
||||
}),
|
||||
|
||||
-- installed via Mason
|
||||
formatting.stylua.with({
|
||||
extra_args = { "--indent-type", "Spaces", "--indent-width", "2" },
|
||||
}),
|
||||
formatting.shfmt,
|
||||
formatting.yamlfix, -- requires python
|
||||
formatting.prettierd,
|
||||
diagnostics.yamllint,
|
||||
diagnostics.sqlfluff.with({
|
||||
extra_args = { "--dialect", "postgres" },
|
||||
}),
|
||||
code_actions.gitsigns,
|
||||
}
|
||||
|
||||
-- extend opts.sources
|
||||
for _, source in ipairs(sources) do
|
||||
table.insert(opts.sources, source)
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
ft = "markdown",
|
||||
build = function()
|
||||
vim.fn["mkdp#util#install"]()
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
opts = {
|
||||
filesystem = {
|
||||
bind_to_cwd = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
return {
|
||||
|
||||
{
|
||||
|
||||
"ahmedkhalf/project.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("project_nvim").setup({
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
--
|
||||
-- All the patterns used to detect root dir, when **"pattern"** is in
|
||||
-- detection_methods
|
||||
patterns = {
|
||||
".git",
|
||||
"_darcs",
|
||||
".hg",
|
||||
".bzr",
|
||||
".svn",
|
||||
"Makefile",
|
||||
"package.json",
|
||||
"pyproject.toml",
|
||||
"poetry.lock",
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("projects")
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
return {
|
||||
|
||||
"ThePrimeagen/refactoring.nvim",
|
||||
dependencies = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-treesitter/nvim-treesitter" },
|
||||
},
|
||||
config = function()
|
||||
require("refactoring").setup()
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>cR",
|
||||
":lua require('refactoring').select_refactor()<CR>",
|
||||
mode = "v",
|
||||
desc = "Refactor",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
|
||||
-- disable tabs
|
||||
{ "akinsho/bufferline.nvim", enabled = false },
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
-- tailwind-tools.lua
|
||||
return {
|
||||
"luckasRanarison/tailwind-tools.nvim",
|
||||
opts = {}, -- your configuration
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
return {
|
||||
|
||||
-- change telescope config
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
|
||||
-- opts will be merged with the parent spec
|
||||
opts = {
|
||||
defaults = {
|
||||
file_ignore_patterns = { "^.git/", "^node_modules/", "^poetry.lock" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- https://github.com/nvim-telescope/telescope-live-grep-args.nvim
|
||||
{
|
||||
"nvim-telescope/telescope-live-grep-args.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
config = function()
|
||||
-- https://github.com/nvim-telescope/telescope-live-grep-args.nvim
|
||||
-- Uses ripgrep args (rg) for live_grep
|
||||
-- Command examples:
|
||||
-- -i "Data" # case insensitive
|
||||
-- -g "!*.md" # ignore md files
|
||||
-- -w # whole word
|
||||
-- -e # regex
|
||||
-- see 'man rg' for more
|
||||
require("telescope").load_extension("live_grep_args")
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>/",
|
||||
":lua require('telescope').extensions.live_grep_args.live_grep_args()<CR>",
|
||||
desc = "Live Grep (Args)",
|
||||
},
|
||||
},
|
||||
|
||||
-- opts will be merged with the parent spec
|
||||
opts = {
|
||||
pickers = {
|
||||
live_grep = {
|
||||
additional_args = function()
|
||||
return { "--hidden" }
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- https://www.lazyvim.org/configuration/recipes#add-telescope-fzf-native
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
build = "make",
|
||||
config = function()
|
||||
require("telescope").load_extension("fzf")
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
return {
|
||||
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
|
||||
dependencies = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-treesitter/nvim-treesitter" },
|
||||
{ "antoinemadec/FixCursorHold.nvim" },
|
||||
{ "folke/neodev.nvim" },
|
||||
|
||||
-- adapters
|
||||
{ "nvim-neotest/neotest-vim-test" },
|
||||
{ "nvim-neotest/neotest-python" },
|
||||
{ "rouge8/neotest-rust" },
|
||||
{ "nvim-neotest/neotest-go" },
|
||||
{ "adrigzr/neotest-mocha" },
|
||||
{ "vim-test/vim-test" },
|
||||
},
|
||||
|
||||
keys = {
|
||||
{
|
||||
"<leader>tS",
|
||||
":lua require('neotest').run.run({ suite = true })<CR>",
|
||||
desc = "Run all tests in suite",
|
||||
},
|
||||
},
|
||||
|
||||
opts = {
|
||||
adapters = {
|
||||
["neotest-python"] = {
|
||||
-- https://github.com/nvim-neotest/neotest-python
|
||||
runner = "pytest",
|
||||
args = { "--log-level", "INFO", "--color", "yes", "-vv", "-s" },
|
||||
-- dap = { justMyCode = false },
|
||||
},
|
||||
["neotest-go"] = {
|
||||
-- see lazy.lua
|
||||
},
|
||||
-- ["neotest-rust"] = {
|
||||
-- -- see lazy.lua
|
||||
-- -- https://github.com/rouge8/neotest-rust
|
||||
-- --
|
||||
-- -- requires nextest, which can be installed via "cargo binstall":
|
||||
-- -- https://github.com/cargo-bins/cargo-binstall
|
||||
-- -- https://nexte.st/book/pre-built-binaries.html
|
||||
-- },
|
||||
["neotest-mocha"] = {
|
||||
-- https://github.com/adrigzr/neotest-mocha
|
||||
filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact" },
|
||||
command = "npm test --",
|
||||
env = { CI = true },
|
||||
cwd = function(_) -- skipped arg is path
|
||||
return vim.fn.getcwd()
|
||||
end,
|
||||
},
|
||||
["neotest-vim-test"] = {
|
||||
-- https://github.com/nvim-neotest/neotest-vim-test
|
||||
ignore_file_types = { "python", "vim", "lua", "rust", "go" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
return {
|
||||
-- {
|
||||
-- "numToStr/Navigator.nvim",
|
||||
-- config = true,
|
||||
-- keys = {
|
||||
-- { "<C-h>", "<cmd>NavigatorLeft<cr>", desc = "Move left" },
|
||||
-- { "<C-l", "<cmd>NavigatorRight<cr>", desc = "Move right" },
|
||||
-- { "<C-j>", "<cmd>NavigatorDown<cr>", desc = "Move down" },
|
||||
-- { "<C-k>", "<cmd>NavigatorUp<cr>", desc = "Move up" },
|
||||
-- },
|
||||
-- },
|
||||
-- {
|
||||
-- "alexghergh/nvim-tmux-navigation",
|
||||
-- config = function()
|
||||
-- require("nvim-tmux-navigation").setup({
|
||||
-- disable_when_zoomed = true, -- defaults to false
|
||||
-- keybindings = {
|
||||
-- left = "<C-h>",
|
||||
-- down = "<C-j>",
|
||||
-- up = "<C-k>",
|
||||
-- right = "<C-l>",
|
||||
-- last_active = "<C-\\>",
|
||||
-- next = "<C-Space>",
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
{
|
||||
"christoomey/vim-tmux-navigator",
|
||||
cmd = {
|
||||
"TmuxNavigateLeft",
|
||||
"TmuxNavigateDown",
|
||||
"TmuxNavigateUp",
|
||||
"TmuxNavigateRight",
|
||||
"TmuxNavigatePrevious",
|
||||
},
|
||||
keys = {
|
||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
return {
|
||||
|
||||
-- add more treesitter parsers, used for e.g. theming and other plugins
|
||||
-- https://github.com/nvim-treesitter/nvim-treesitter#supported-languages
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"comment",
|
||||
"css",
|
||||
"diff",
|
||||
"git_config",
|
||||
"git_rebase",
|
||||
"go",
|
||||
"gomod",
|
||||
"html",
|
||||
"http",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"php",
|
||||
"proto",
|
||||
"python",
|
||||
"query",
|
||||
"graphql",
|
||||
"regex",
|
||||
"rst",
|
||||
"rust",
|
||||
"scss",
|
||||
"svelte",
|
||||
"swift",
|
||||
"sql",
|
||||
"terraform",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vue",
|
||||
"yaml",
|
||||
},
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
-- Hier kommt die neue Konfiguration
|
||||
indent = { enable = true },
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
-- Operator-Hervorhebung
|
||||
playground = {
|
||||
enable = true,
|
||||
disable = {},
|
||||
updatetime = 25,
|
||||
persist_queries = false,
|
||||
keybindings = {
|
||||
toggle_query_editor = "o",
|
||||
toggle_hl_groups = "i",
|
||||
toggle_injected_languages = "t",
|
||||
toggle_anonymous_nodes = "a",
|
||||
toggle_language_display = "I",
|
||||
focus_language = "f",
|
||||
unfocus_language = "F",
|
||||
update = "R",
|
||||
goto_node = "<cr>",
|
||||
show_help = "?",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- https://github.com/nvim-treesitter/nvim-treesitter-context
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
},
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
},
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"mbbill/undotree",
|
||||
cmd = "UndotreeToggle",
|
||||
keys = {
|
||||
{ "<leader>fu", "<cmd>UndotreeToggle<cr>", desc = "Undo tree" },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
local lsp_conficts, _ = pcall(vim.api.nvim_get_autocmds, { group = "LspAttach_conflicts" })
|
||||
if not lsp_conficts then
|
||||
vim.api.nvim_create_augroup("LspAttach_conflicts", {})
|
||||
end
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = "LspAttach_conflicts",
|
||||
desc = "prevent tsserver and volar competing",
|
||||
callback = function(args)
|
||||
if not (args.data and args.data.client_id) then
|
||||
return
|
||||
end
|
||||
local active_clients = vim.lsp.get_active_clients()
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
-- prevent tsserver and volar competing
|
||||
-- if client.name == "volar" or require("lspconfig").util.root_pattern("nuxt.config.ts")(vim.fn.getcwd()) then
|
||||
-- OR
|
||||
if client.name == "volar" then
|
||||
for _, client_ in pairs(active_clients) do
|
||||
-- stop tsserver if volar is already active
|
||||
if client_.name == "tsserver" then
|
||||
client_.stop()
|
||||
end
|
||||
end
|
||||
elseif client.name == "tsserver" then
|
||||
for _, client_ in pairs(active_clients) do
|
||||
-- prevent tsserver from starting if volar is already active
|
||||
if client_.name == "volar" then
|
||||
client.stop()
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
volar = {
|
||||
filetypes = {
|
||||
"javascript",
|
||||
"typescript",
|
||||
"vue",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{},
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
defaults = {
|
||||
mappings = {
|
||||
{ "<leader>t", { name = "+test" } },
|
||||
{ "<leader>gb", { name = "+blame" } },
|
||||
{ "<leader>gd", { name = "+diffview" } },
|
||||
{ "<leader>h", { name = "+harpoon" } },
|
||||
{ "<leader>r", { name = "+run" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local wk = require("which-key")
|
||||
wk.setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
return {
|
||||
|
||||
{ "folke/zen-mode.nvim" },
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
column_width = 120
|
||||
Reference in New Issue
Block a user