Compare commits
26 Commits
9c7c68c8f4
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5656c2d385 | |||
| 5511da5a98 | |||
| 4e2f25ae43 | |||
| c0b67ced35 | |||
| 921b2a10d5 | |||
| d8c8cde4f5 | |||
| a27bcce0aa | |||
| f00fac3363 | |||
| 067e36cf2a | |||
| 831cdc8210 | |||
| 4137b7424d | |||
| 5c35466664 | |||
| 049a10e60e | |||
| d778a22a6c | |||
| acb75bff40 | |||
| 94b2c40db1 | |||
| bed9726930 | |||
| 0117c3812b | |||
| f482b920f8 | |||
| bf4008358d | |||
| d05390b2e7 | |||
| 5be678def0 | |||
| 74b1528403 | |||
| 5b6c9c986f | |||
| 8fbe4074bf | |||
| 50a8c1fcc7 |
20
.pre-commit-config.yaml
Normal file
20
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# See https://pre-commit.com for more information
|
||||||
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v6.0.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: check-yaml
|
||||||
|
- id: check-added-large-files
|
||||||
|
- repo: https://github.com/Yelp/detect-secrets
|
||||||
|
rev: v1.5.0
|
||||||
|
hooks:
|
||||||
|
- id: detect-secrets
|
||||||
|
args: ['--baseline', '.secrets.baseline']
|
||||||
|
exclude: lazy-lock.json
|
||||||
|
- repo: https://github.com/JohnnyMorganz/StyLua
|
||||||
|
rev: v2.4.1
|
||||||
|
hooks:
|
||||||
|
- id: stylua
|
||||||
586
.secrets.baseline
Normal file
586
.secrets.baseline
Normal file
@@ -0,0 +1,586 @@
|
|||||||
|
{
|
||||||
|
"version": "1.5.0",
|
||||||
|
"plugins_used": [
|
||||||
|
{
|
||||||
|
"name": "ArtifactoryDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "AWSKeyDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "AzureStorageKeyDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Base64HighEntropyString",
|
||||||
|
"limit": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BasicAuthDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CloudantDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DiscordBotTokenDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GitHubTokenDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GitLabTokenDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "HexHighEntropyString",
|
||||||
|
"limit": 3.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "IbmCloudIamDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "IbmCosHmacDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "IPPublicDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "JwtTokenDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "KeywordDetector",
|
||||||
|
"keyword_exclude": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "MailchimpDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "NpmDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "OpenAIDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "PrivateKeyDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "PypiTokenDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SendGridDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SlackDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SoftlayerDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SquareOAuthDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "StripeDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TelegramBotTokenDetector"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TwilioKeyDetector"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"filters_used": [
|
||||||
|
{
|
||||||
|
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "detect_secrets.filters.common.is_baseline_file",
|
||||||
|
"filename": ".secrets.baseline"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
|
||||||
|
"min_level": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "detect_secrets.filters.heuristic.is_lock_file"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "detect_secrets.filters.heuristic.is_sequential_string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "detect_secrets.filters.heuristic.is_swagger_file"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "detect_secrets.filters.heuristic.is_templated_secret"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"results": {
|
||||||
|
".gitlab-ci.yml": [
|
||||||
|
{
|
||||||
|
"type": "Secret Keyword",
|
||||||
|
"filename": ".gitlab-ci.yml",
|
||||||
|
"hashed_secret": "5ffe533b830f08a0326348a9160afafc8ada44db",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 17
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"README.md": [
|
||||||
|
{
|
||||||
|
"type": "Basic Auth Credentials",
|
||||||
|
"filename": "README.md",
|
||||||
|
"hashed_secret": "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 85
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"lazy-lock.json": [
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "3af1f0716a64d25be23ef3cf43648e5e476b6c35",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "a6cd36a945ae41022cf8fd0efc0f523490fbc8c4",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "3954c288d09f52eb9b230c1eff653d9442c5b1c3",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "834a80d9a9a8b2bc96a3d8bf2fe57670fb9b6fd9",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "6f4495f1dc02bda238cec4f27014054c0c2e641c",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "af9200fda20d54f77643da81a8bc6dee8f8bdafb",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 7
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "a05794a478a7b2c50f9411b5aa3e61ca7995c00e",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "b34e425d01ca323c0c9518dc1872d9c000950ded",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "f603c5b7b85d947c6b27028859833b28c7c4f6b9",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "98d8da1a19f260ac98e1ac7520131c4d004a94c1",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "5b84c6ace33b445bf8154ec11bc0572b4e7cb9c5",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "05e1c6cb1f70c2b1760a0fd48fbbac03093f7388",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 13
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "9c1302a2faec1ab7af60d67653ea5c2fed8815ef",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 14
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "96cc789a527f8268d2cca9569b4226d76810b6e9",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "ede99b25244352245ad067502329795469d2736b",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 16
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "b4035e21e845f317416c0b2ff364166eea340df9",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 17
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "5bb4648c4b8d90a196beb1cfe0913426e8c0570b",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 18
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "4052a854964a9f785a09988a47f6b05953b48120",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 19
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "1b392c86b55466213daa298f3a0757064b1bd4d7",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 20
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "13a42f8a6aaad30c842a3cb25d50a3c00dc1b251",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 21
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "7c333072524443dbfebd9108e64e91bb3494bf9b",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 22
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "ee156b6bb148f64db9dba27d63bc9f53e64c492d",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 23
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "06eb4a69635c6b8729c82c60674fac6c2f1b0c33",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 24
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "6173dccc123e0da423cce524abeb12e6f1faa6b8",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "667b60cbb863e5407c913e072a1d42395496e529",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 26
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "d849531474d4ae1c55f7a09161d82f22b2fac508",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 27
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "5a1a30d97742ada0ecf3565220ed861969a5a7d0",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 28
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "96826113d3e2f26d3bf477f968be022fb4d2f17b",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 29
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "b04db8de0d2dbeee436a6d2addd57ca5e468853a",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 30
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "5bb079e4bc2f5177c0db0564407350b1f5186100",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 31
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "99da4574e023c99b0ab94317a83a788aaafd3fc0",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 32
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "4d9e8162c92d31d9e85d348bb727da8694bbd19a",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 33
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "4d214cee281b241ca2f213f9e8aeae69c3f62a7c",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 34
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "b236422addddccca25bfadbeb1a86e3bc97dd50a",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 35
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "50fe46c2dd7cc2da2d829db7eddb28247bffb684",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 36
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "4151960bc1ea09bca7f709e03c782845ac4bc064",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 37
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "dd90ab427819a4a57c6a36511597828cfe984246",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 38
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "0f305546e18dacf3cdc13e231aa122d35d72578b",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 39
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "50878928df5e3a18e753bf59c72c340381763506",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 40
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "afc7b8f889a5bd08a5cdc4bf7463187b719df8d3",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 41
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "683f0518650b41601ae367abfcee9c4883c9f6a3",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 42
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "f5a85768c2fb9cd32cbd893b504f70231ead0302",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 43
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "f85462d0f27b3df90a78bb9a650b71c2d33df05f",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 44
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "1e83d6c436ae4d06000ac0f408db9d8d29c3fe0e",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 45
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "243f6b48ff3330e756004abe753e4c9c34028e6c",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 46
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "7db5b5b1c2c11679857d56addd3bd2479aab2721",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 47
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "cf08b67aeabdd2fd7cafcfd753da8bbab5c684d7",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 48
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "75ce9fc38e1e842804880912e61a1b1aea68111c",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 49
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "8038994bf26fbd417a89077f6ef31d1ebf6544f9",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 50
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "b0ea3c8a9f3e55a936c4343eb8ebc7f08d3cceb9",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 51
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "a53747c40232cec5f46cad5d6c4a150a213714d9",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 52
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "d32e48780bb2ffd37e10b688cf92d9b5fc74d8a2",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 53
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "d16bf1d12a05db793b05d478084663fd5bb575b1",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 54
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "75842ef8e50bb624e56c5ca14baa3e1d4aea0671",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 55
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "7a4ad32c40710bf70f02a7b93b9f77b648c92c2d",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 56
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "b090bdd1d5916498909d802dcbd7097ca9b5a6d5",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 57
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "981d9335450b84272d3e271c355e6dfc1307fb13",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 58
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "e12dbca56cd5a0ad00da1fd4e03f1f798aecc6a3",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 59
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "4c141f751740b73e3132164878ad16f6e72c7e04",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 60
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "210f3750437c4ea33f429027c708a7683fff4ecf",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 61
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "33b337f5f3435a7e53244176e22c4fd5e08cf826",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 62
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Hex High Entropy String",
|
||||||
|
"filename": "lazy-lock.json",
|
||||||
|
"hashed_secret": "f74e293d7f3cbea3435732dcc1704c5c03d8105e",
|
||||||
|
"is_verified": false,
|
||||||
|
"line_number": 63
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"generated_at": "2026-06-06T21:52:58Z"
|
||||||
|
}
|
||||||
376
README.md
376
README.md
@@ -1,18 +1,28 @@
|
|||||||
# Neovim Configuration with LazyVim
|
# Neovim Configuration (LazyVim)
|
||||||
|
|
||||||
A comprehensive Neovim setup with LSP support, AI chat, database integration, and debugging.
|
A LazyVim-based setup focused on Go and Zig development, with LSP, debugging,
|
||||||
|
test running, task running, AI chat, database tooling, and a which-key cheat
|
||||||
|
sheet. Everything is lazy-loaded so plugins only activate for the filetype or
|
||||||
|
command that needs them.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- Neovim >= 0.9.0 (installed via Homebrew)
|
- **Neovim >= 0.11** (developed on 0.12.x; 0.11+ is required for the modern
|
||||||
- Git
|
`vim.lsp` / `root_markers` API used by some servers)
|
||||||
- A Nerd Font (for icons)
|
- **Git**
|
||||||
- Node.js (for some LSP servers and formatters)
|
- **A Nerd Font** (icons in the explorer, statusline, dadbod UI, etc.)
|
||||||
- Go (for gopls and delve)
|
- **Node.js** — TypeScript/JSON/YAML/web LSPs and `prettier`
|
||||||
|
- **Go** — `gopls`, `delve`, `gofumpt`, `goimports`
|
||||||
|
- **Zig** — the `zig` toolchain on `$PATH` (for LSP, build/run, tests, debug)
|
||||||
|
- **Python** _(optional)_ — `pyright` + `ruff` are configured if you use it
|
||||||
|
|
||||||
|
Most language servers, linters, formatters, and DAP adapters install
|
||||||
|
automatically through Mason on first launch.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. **Backup existing configuration** (if any):
|
1. **Back up any existing config:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mv ~/.config/nvim ~/.config/nvim.bak
|
mv ~/.config/nvim ~/.config/nvim.bak
|
||||||
mv ~/.local/share/nvim ~/.local/share/nvim.bak
|
mv ~/.local/share/nvim ~/.local/share/nvim.bak
|
||||||
@@ -20,161 +30,287 @@ A comprehensive Neovim setup with LSP support, AI chat, database integration, an
|
|||||||
mv ~/.cache/nvim ~/.cache/nvim.bak
|
mv ~/.cache/nvim ~/.cache/nvim.bak
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Clone this configuration**:
|
2. **Clone:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone <your-repo-url> ~/.config/nvim
|
git clone https://git.samoneal.io/sam_oneal/nvim-config.git ~/.config/nvim
|
||||||
```
|
```
|
||||||
|
|
||||||
3. **Start Neovim**:
|
3. **Launch Neovim.** lazy.nvim bootstraps itself and installs all plugins.
|
||||||
```bash
|
|
||||||
nvim
|
|
||||||
```
|
|
||||||
Lazy.nvim will automatically install all plugins on first launch.
|
|
||||||
|
|
||||||
4. **Install LSP servers and tools**:
|
4. **Install tooling** with `:Mason` (or `:MasonInstall <tool>`). Check health
|
||||||
After plugins load, run:
|
with `:checkhealth` and LSP attachment with `:checkhealth lsp`.
|
||||||
```
|
|
||||||
:Mason
|
|
||||||
```
|
|
||||||
All required tools should install automatically.
|
|
||||||
|
|
||||||
## Features
|
## What's included
|
||||||
|
|
||||||
### Language Support (LSP + Treesitter)
|
**Base:** [LazyVim](https://www.lazyvim.org/) with leader = `<Space>`,
|
||||||
- Go, Lua, TypeScript, JavaScript, HTML, CSS, JSON, YAML, Markdown, SQL, Makefile
|
localleader = `\`, colorscheme `catppuccin-mocha`.
|
||||||
|
|
||||||
### AI Chat Integration
|
**LazyVim extras enabled** (in `lua/config/lazy.lua`): `lang.go`, `lang.json`,
|
||||||
Supports multiple providers via [avante.nvim](https://github.com/yetone/avante.nvim):
|
`lang.yaml`, `lang.markdown`, `lang.typescript`, `lang.tailwind`,
|
||||||
- Anthropic Claude
|
`dap.core`.
|
||||||
- OpenAI GPT
|
|
||||||
- Google Gemini
|
|
||||||
- And more
|
|
||||||
|
|
||||||
Set your API keys as environment variables:
|
**Languages (LSP + Treesitter):** Go, Zig, Lua, TypeScript/JavaScript, HTML,
|
||||||
```bash
|
CSS, JSON, YAML, Markdown, SQL, Dockerfile, Python.
|
||||||
export ANTHROPIC_API_KEY="your-key"
|
|
||||||
export OPENAI_API_KEY="your-key"
|
|
||||||
export GEMINI_API_KEY="your-key"
|
|
||||||
```
|
|
||||||
|
|
||||||
Switch providers: `:AvanteProvider claude|openai|gemini`
|
| Concern | Plugin / tool |
|
||||||
|
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| LSP | nvim-lspconfig + Mason (`gopls`, `zls`, `lua_ls`, `ts_ls`, `html`, `cssls`, `jsonls`, `yamlls`, `marksman`, `sqlls`, `dockerls`, `pyright`/`ruff`) |
|
||||||
|
| Completion | blink.cmp (LazyVim default; SQL routed to dadbod) |
|
||||||
|
| Formatting | conform.nvim via LazyVim's format pipeline |
|
||||||
|
| Debugging | nvim-dap + delve (Go), codelldb (Zig/C/C++) |
|
||||||
|
| Testing | neotest (Go, Python, Zig) with in-buffer pass/fail signs |
|
||||||
|
| Coverage | nvim-coverage (Go) |
|
||||||
|
| Task running | overseer.nvim (+ user templates) |
|
||||||
|
| AI chat | [opencode.nvim](https://github.com/nickjvandyke/opencode.nvim) (provider-agnostic) |
|
||||||
|
| Database | vim-dadbod + dadbod-ui + dadbod-completion |
|
||||||
|
| Git | Neogit + diffview, plus LazyVim's lazygit |
|
||||||
|
| Explorer/picker | snacks.nvim |
|
||||||
|
| Symbols | aerial.nvim |
|
||||||
|
| Diagnostics | trouble.nvim |
|
||||||
|
| Cheat sheet | which-key.nvim (hold `<leader>`) |
|
||||||
|
|
||||||
### Database Integration (vim-dadbod)
|
### AI (opencode.nvim)
|
||||||
- `:DBUIToggle` - Open database UI
|
|
||||||
- `:DBUIAddConnection` - Add a new connection
|
AI is intentionally **environment-agnostic**: opencode.nvim drives the external
|
||||||
|
[`opencode`](https://opencode.ai) CLI, so the model/provider (Anthropic,
|
||||||
|
OpenAI, local models, etc.) is chosen in opencode's own config rather than here.
|
||||||
|
Install the `opencode` CLI separately and configure your provider there.
|
||||||
|
|
||||||
|
### Database (vim-dadbod)
|
||||||
|
|
||||||
|
Open the UI with `<leader>Du`. Add a connection with `<leader>Da`. Examples:
|
||||||
|
|
||||||
Connection string examples:
|
|
||||||
```
|
```
|
||||||
postgresql://user:pass@localhost:5432/dbname
|
postgresql://user:pass@localhost:5432/dbname
|
||||||
mysql://user:pass@localhost:3306/dbname
|
mysql://user:pass@localhost:3306/dbname
|
||||||
sqlite:path/to/db.sqlite
|
sqlite:path/to/db.sqlite
|
||||||
```
|
```
|
||||||
|
|
||||||
### Go Debugging (DAP + Delve)
|
SQL completion is provided via dadbod inside SQL buffers, and SQL
|
||||||
Full debugging support with breakpoints, stepping, variable inspection.
|
autoformat-on-save is intentionally disabled (format manually with
|
||||||
|
`<leader>cf`).
|
||||||
|
|
||||||
## Key Bindings
|
## Key bindings
|
||||||
|
|
||||||
### Terminal
|
Hold `<leader>` (Space) to pop up the **which-key** menu — it lists every group
|
||||||
|
below as a live cheat sheet. Mouse is enabled (`mouse=a`), and the explorer,
|
||||||
|
dadbod UI, Neogit, DAP UI, trouble, aerial, and Overseer pickers are all
|
||||||
|
clickable.
|
||||||
|
|
||||||
|
> Note the deliberate capitalization: **`<leader>T*`** is Terminal (lowercase
|
||||||
|
> `<leader>t*` is the Test group), and **`<leader>D*`** is Database (lowercase
|
||||||
|
> `<leader>d*` is Debug).
|
||||||
|
|
||||||
|
### AI (`<leader>a`)
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| --------------------- | ---------------------------------- |
|
||||||
|
| `<leader>aa` | Ask AI about current context (n/v) |
|
||||||
|
| `<leader>ax` | Ask AI about selection |
|
||||||
|
| `<leader>at` | Toggle AI panel |
|
||||||
|
| `go` | Operator: add range to AI chat |
|
||||||
|
| `goo` | Add current line to AI chat |
|
||||||
|
| `<S-C-u>` / `<S-C-d>` | Scroll AI chat up/down |
|
||||||
|
|
||||||
|
### Code › Go (`<leader>cg`)
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| -------------- | ------------------------------------- |
|
||||||
|
| `<leader>cgb` | Run benchmarks (`-bench=. -benchmem`) |
|
||||||
|
| `<leader>cgpc` | CPU profile |
|
||||||
|
| `<leader>cgpm` | Memory profile |
|
||||||
|
| `<leader>cgpt` | Trace profile |
|
||||||
|
|
||||||
|
### Code › Zig (`<leader>cz`)
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| ------------- | ---------------- |
|
||||||
|
| `<leader>czb` | `zig build` |
|
||||||
|
| `<leader>czr` | `zig build run` |
|
||||||
|
| `<leader>czt` | `zig build test` |
|
||||||
|
|
||||||
|
### Tests (neotest, `<leader>t`)
|
||||||
|
|
||||||
|
Works in Go, Python, and Zig buffers; results show as signs in the gutter.
|
||||||
| Key | Action |
|
| Key | Action |
|
||||||
|-----|--------|
|
|-----|--------|
|
||||||
| `<leader>th` | Open terminal (horizontal split) |
|
| `<leader>tt` | Run nearest test |
|
||||||
| `<leader>tv` | Open terminal (vertical split) |
|
| `<leader>tf` | Run test file |
|
||||||
| `<C-\>` | Toggle floating terminal |
|
| `<leader>ts` | Toggle test summary |
|
||||||
| `<Esc><Esc>` | Exit terminal mode |
|
| `<leader>to` | Open test output |
|
||||||
|
| `<leader>tc` | Show coverage (Go) |
|
||||||
|
|
||||||
### File Explorer (Snacks explorer)
|
### Debugging (DAP, `<leader>d`)
|
||||||
| Key | Action |
|
|
||||||
|-----|--------|
|
|
||||||
| `<C-S-e>` | Toggle explorer |
|
|
||||||
| `<C-S-v>` or `<C-v>` | Open file in vertical split |
|
|
||||||
| `<C-S-h>` or `<C-x>` | Open file in horizontal split |
|
|
||||||
| `<leader>e` | Focus explorer (LazyVim default) |
|
|
||||||
|
|
||||||
### AI Chat
|
Go uses delve; Zig/C/C++ use codelldb. Zig launch configs build with debug
|
||||||
| Key | Action |
|
symbols first, then run (`Launch (zig build)` prompts for the exe under
|
||||||
|-----|--------|
|
`zig-out/bin`; `Launch (current file)` compiles the open file).
|
||||||
| `<leader>aa` | Ask AI (with selection in visual mode) |
|
|
||||||
| `<leader>ac` | Open AI chat |
|
|
||||||
| `<leader>at` | Toggle AI sidebar |
|
|
||||||
|
|
||||||
### Database
|
|
||||||
| Key | Action |
|
|
||||||
|-----|--------|
|
|
||||||
| `<leader>db` | Toggle database UI |
|
|
||||||
| `<leader>da` | Add database connection |
|
|
||||||
|
|
||||||
### Debugging
|
|
||||||
| Key | Action |
|
| Key | Action |
|
||||||
|-----|--------|
|
|-----|--------|
|
||||||
| `<leader>db` | Toggle breakpoint |
|
| `<leader>db` | Toggle breakpoint |
|
||||||
| `<leader>dB` | Breakpoint with condition |
|
| `<leader>dB` | Conditional breakpoint |
|
||||||
| `<leader>dc` | Continue |
|
| `<leader>dc` | Continue / start |
|
||||||
|
| `<leader>dC` | Run to cursor |
|
||||||
| `<leader>di` | Step into |
|
| `<leader>di` | Step into |
|
||||||
| `<leader>do` | Step out |
|
|
||||||
| `<leader>dO` | Step over |
|
| `<leader>dO` | Step over |
|
||||||
|
| `<leader>do` | Step out |
|
||||||
|
| `<leader>dj` / `<leader>dk` | Stack down / up |
|
||||||
|
| `<leader>dr` | Toggle REPL |
|
||||||
|
| `<leader>ds` | Session |
|
||||||
|
| `<leader>dt` | Terminate |
|
||||||
|
| `<leader>dw` | Inspect widget (hover) |
|
||||||
| `<leader>du` | Toggle DAP UI |
|
| `<leader>du` | Toggle DAP UI |
|
||||||
|
| `<leader>de` | Eval (n/v) |
|
||||||
| `<leader>dT` | Debug Go test |
|
| `<leader>dT` | Debug Go test |
|
||||||
| `<leader>dt` | Terminate debug session |
|
| `<leader>dL` | Debug last Go test |
|
||||||
|
|
||||||
### Formatting
|
### Tasks (Overseer, `<leader>o`)
|
||||||
| Key | Action |
|
|
||||||
|-----|--------|
|
|
||||||
| `<leader>cf` | Format buffer |
|
|
||||||
| `:FormatToggle` | Toggle auto-format on save |
|
|
||||||
| `:FormatDisable` | Disable auto-format |
|
|
||||||
| `:FormatEnable` | Enable auto-format |
|
|
||||||
|
|
||||||
### General
|
| Key | Action |
|
||||||
| Key | Action |
|
| ------------ | --------------------------------------------------------- |
|
||||||
|-----|--------|
|
| `<leader>or` | Run a task (picker — includes `go:` and `zig:` templates) |
|
||||||
| `<C-s>` | Save file |
|
| `<leader>ot` | Toggle task list |
|
||||||
| `<S-h>` / `<S-l>` | Previous/Next buffer |
|
|
||||||
| `<C-h/j/k/l>` | Navigate windows |
|
|
||||||
| `<A-j>` / `<A-k>` | Move line down/up |
|
|
||||||
|
|
||||||
## File Structure
|
### Database (`<leader>D`)
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| ------------ | -------------- |
|
||||||
|
| `<leader>Du` | Toggle DB UI |
|
||||||
|
| `<leader>Da` | Add connection |
|
||||||
|
| `<leader>Df` | Find DB buffer |
|
||||||
|
|
||||||
|
### Git (`<leader>g`)
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| ------------ | ------------------------- |
|
||||||
|
| `<leader>gg` | Lazygit (LazyVim default) |
|
||||||
|
| `<leader>gn` | Neogit |
|
||||||
|
| `<leader>gl` | Lazygit log |
|
||||||
|
| `<leader>gf` | Lazygit file history |
|
||||||
|
|
||||||
|
### Search / Symbols (`<leader>s`)
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| ------------ | ------------------------ |
|
||||||
|
| `<leader>so` | Symbols outline (aerial) |
|
||||||
|
| `<leader>sh` | Incoming calls |
|
||||||
|
| `<leader>sc` | Outgoing calls |
|
||||||
|
|
||||||
|
### Diagnostics (Trouble, `<leader>x`)
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| ------------ | --------------------- |
|
||||||
|
| `<leader>xx` | Diagnostics |
|
||||||
|
| `<leader>xw` | Workspace diagnostics |
|
||||||
|
| `<leader>xt` | TODOs |
|
||||||
|
|
||||||
|
### Terminal (`<leader>T`)
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| ------------ | --------------------------- |
|
||||||
|
| `<leader>Th` | Terminal (horizontal split) |
|
||||||
|
| `<leader>Tv` | Terminal (vertical split) |
|
||||||
|
| `<Esc><Esc>` | Exit terminal mode |
|
||||||
|
|
||||||
|
### Explorer & windows
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| ------------------------ | ----------------------------- |
|
||||||
|
| `<C-e>` | Toggle explorer (snacks) |
|
||||||
|
| `<C-S-v>` / `<C-v>` | Open file in vertical split |
|
||||||
|
| `<C-S-h>` / `<C-x>` | Open file in horizontal split |
|
||||||
|
| `<C-h/j/k/l>` | Navigate windows |
|
||||||
|
| `<C-Up/Down/Left/Right>` | Resize window |
|
||||||
|
|
||||||
|
### Formatting (LazyVim pipeline)
|
||||||
|
|
||||||
|
| Key / Command | Action |
|
||||||
|
| ------------- | -------------------------- |
|
||||||
|
| `<leader>cf` | Format buffer |
|
||||||
|
| `<leader>uf` | Toggle autoformat (buffer) |
|
||||||
|
| `<leader>uF` | Toggle autoformat (global) |
|
||||||
|
| `:LazyFormat` | Format now |
|
||||||
|
|
||||||
|
### General editing
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| ------------------ | --------------------------- |
|
||||||
|
| `<C-s>` | Save file |
|
||||||
|
| `<S-h>` / `<S-l>` | Prev / next buffer |
|
||||||
|
| `<Esc>` | Clear search highlight |
|
||||||
|
| `<A-j>` / `<A-k>` | Move line/selection down/up |
|
||||||
|
| `<` / `>` (visual) | Indent, keep selection |
|
||||||
|
|
||||||
|
## Formatters by file type
|
||||||
|
|
||||||
|
| File type | Formatter |
|
||||||
|
| --------------- | ---------------------------------------- |
|
||||||
|
| Go | gofumpt, goimports (`-local github.com`) |
|
||||||
|
| Lua | stylua (2-space) |
|
||||||
|
| JS/TS/JSX/TSX | prettier (2-space, single quotes) |
|
||||||
|
| HTML/CSS/SCSS | prettier |
|
||||||
|
| JSON/JSONC/YAML | prettier |
|
||||||
|
| Markdown | prettier |
|
||||||
|
| SQL | sql-formatter (postgresql; manual only) |
|
||||||
|
|
||||||
|
## File structure
|
||||||
|
|
||||||
```
|
```
|
||||||
~/.config/nvim/
|
~/.config/nvim/
|
||||||
├── init.lua # Entry point
|
├── init.lua # Entry point → require("config.lazy")
|
||||||
├── lua/
|
├── lua/
|
||||||
│ ├── config/
|
│ ├── config/
|
||||||
│ │ ├── lazy.lua # Lazy.nvim bootstrap & LazyVim setup
|
│ │ ├── lazy.lua # lazy.nvim bootstrap, LazyVim + extras
|
||||||
│ │ ├── options.lua # General Neovim options
|
│ │ ├── options.lua # Neovim options
|
||||||
│ │ ├── keymaps.lua # Custom key bindings
|
│ │ ├── keymaps.lua # Custom keymaps
|
||||||
│ │ └── autocmds.lua # Auto commands
|
│ │ └── autocmds.lua # Autocommands (yank hl, ft tweaks, SQL no-autoformat…)
|
||||||
│ └── plugins/
|
│ ├── plugins/
|
||||||
│ ├── lsp.lua # LSP & Treesitter configuration
|
│ │ ├── mason.lua # Tooling installs (LSP/linters/formatters/DAP)
|
||||||
│ ├── ai.lua # AI chat integration (avante.nvim)
|
│ │ ├── lspconfig.lua # Per-server LSP config (gopls, zls, …)
|
||||||
│ ├── dadbod.lua # Database integration
|
│ │ ├── treesitter.lua # Parsers
|
||||||
│ ├── dap.lua # Debugging configuration
|
│ │ ├── formatting.lua # conform.nvim
|
||||||
│ ├── formatting.lua # Auto-formatting (conform.nvim)
|
│ │ ├── dap.lua # Debugging (Go via delve, Zig via codelldb)
|
||||||
│ └── editor.lua # Editor enhancements (snacks explorer, etc.)
|
│ │ ├── neotest.lua # Test runner (go/python/zig)
|
||||||
|
│ │ ├── go-coverage.lua # Go coverage signs
|
||||||
|
│ │ ├── overseer.lua # Task runner
|
||||||
|
│ │ ├── ai.lua # opencode.nvim
|
||||||
|
│ │ ├── dadbod.lua # Database
|
||||||
|
│ │ ├── git.lua # Neogit + diffview
|
||||||
|
│ │ ├── editor.lua # snacks tweaks + which-key groups
|
||||||
|
│ │ ├── symbols.lua # aerial
|
||||||
|
│ │ ├── dashboard.lua # trouble opts
|
||||||
|
│ │ ├── devcontainer.lua # nvim-remote-containers
|
||||||
|
│ │ ├── performance.lua # treesitter large-file guard
|
||||||
|
│ │ ├── theme.lua # catppuccin
|
||||||
|
│ │ └── zig.lua # Zig ft plugin (toolchain wired across files)
|
||||||
|
│ └── overseer/template/user/ # go_*, zig_{build,run,test} task templates
|
||||||
```
|
```
|
||||||
|
|
||||||
## Formatters by File Type
|
## Zig notes
|
||||||
|
|
||||||
| File Type | Formatter |
|
- LSP is `zls` (`lua/plugins/lspconfig.lua`), root markers `build.zig` /
|
||||||
|-----------|-----------|
|
`build.zig.zon`, with build-on-save and inlay hints.
|
||||||
| Go | gofumpt, goimports |
|
- `zig build test` and project-wide neotest runs require a standard `test` step
|
||||||
| Lua | stylua |
|
in your `build.zig`; individual `.zig` files also work.
|
||||||
| JS/TS/JSX/TSX | prettier |
|
- Debugging needs `codelldb` (`:MasonInstall codelldb` if it doesn't
|
||||||
| HTML/CSS | prettier |
|
auto-install). Builds use `-O Debug` so symbols are present.
|
||||||
| JSON/YAML | prettier |
|
|
||||||
| Markdown | prettier |
|
|
||||||
| SQL | sql-formatter |
|
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### LSP not working
|
- **LSP not attaching:** `:checkhealth lsp` — confirm the server appears and is
|
||||||
Run `:LspInfo` to check status. Run `:Mason` to verify tools are installed.
|
attached (not just installed in Mason). If `root_dir`/`root_markers` look off,
|
||||||
|
the server may not find your project root.
|
||||||
|
- **Formatting:** `:ConformInfo`.
|
||||||
|
- **Tests not detected:** ensure the Treesitter parser for the language is
|
||||||
|
installed (`:TSInstall <lang>`); Zig needs a `test` step in `build.zig`.
|
||||||
|
- **Ctrl+Shift keys not firing:** some terminals don't transmit them; use the
|
||||||
|
plain-Ctrl fallbacks (`<C-v>` / `<C-x>` in the explorer).
|
||||||
|
- **Nerd Font icons missing:** install a Nerd Font and set it in your terminal.
|
||||||
|
|
||||||
### Formatting not working
|
## Known issues (in current repo)
|
||||||
Run `:ConformInfo` to check formatter status.
|
|
||||||
|
|
||||||
### Icons not displaying
|
Two unrelated typos exist in `lua/config/keymaps.lua`'s opencode block (present
|
||||||
Install a Nerd Font and configure your terminal to use it.
|
before these docs): the scroll-up command string reads `sesion.half.page.up`
|
||||||
|
(should be `session.…`), and `<leader>at` is mapped in `t` (terminal) mode where
|
||||||
### Ctrl+Shift keybindings not working
|
`n`/`x` is likely intended. Documented here for accuracy; fix when convenient.
|
||||||
Some terminals don't properly send Ctrl+Shift combinations. Use the alternative mappings (`<C-v>` and `<C-x>` in snacks explorer).
|
|
||||||
|
|||||||
@@ -1,31 +1,30 @@
|
|||||||
{
|
{
|
||||||
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||||
"LazyVim": { "branch": "main", "commit": "28db03f958d58dfff3c647ce28fdc1cb88ac158d" },
|
"LazyVim": { "branch": "main", "commit": "28db03f958d58dfff3c647ce28fdc1cb88ac158d" },
|
||||||
"SchemaStore.nvim": { "branch": "main", "commit": "fb7b9034285a5658c746faa12eff8c1c9d9b11b1" },
|
"SchemaStore.nvim": { "branch": "main", "commit": "a0fad73139f98ea1d6e9d380374c16245e562f4f" },
|
||||||
"aerial.nvim": { "branch": "master", "commit": "7a6a42791eb2b54a7115c7db4488981f93471770" },
|
"aerial.nvim": { "branch": "master", "commit": "7a6a42791eb2b54a7115c7db4488981f93471770" },
|
||||||
"avante.nvim": { "branch": "main", "commit": "e89eb79abf5754645e20aa6074da10ed20bba33c" },
|
"avante.nvim": { "branch": "main", "commit": "e1e70be8ee34144d3ce4b0608e9b30aab3feb701" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" },
|
"blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
"catppuccin": { "branch": "main", "commit": "beaf41a30c26fd7d6c386d383155cbd65dd554cd" },
|
"catppuccin": { "branch": "main", "commit": "beaf41a30c26fd7d6c386d383155cbd65dd554cd" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
|
"conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
|
||||||
"copilot.lua": { "branch": "master", "commit": "2d7511494245129aa6c2176f9c71cc2bc1360ed9" },
|
|
||||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "42d6aed4e94e0f0bbced16bbdcc42f57673bd75e" },
|
"gitsigns.nvim": { "branch": "main", "commit": "abf82a65f185bd54adc0679f74b7d6e1ada690c9" },
|
||||||
"grug-far.nvim": { "branch": "main", "commit": "794f03c97afc7f4b03fb6ec5111be507df1850cf" },
|
"grug-far.nvim": { "branch": "main", "commit": "1f7a722a9b9f0206a345377c13e62542f484398a" },
|
||||||
"img-clip.nvim": { "branch": "main", "commit": "b6ddfb97b5600d99afe3452d707444afda658aca" },
|
"img-clip.nvim": { "branch": "main", "commit": "b6ddfb97b5600d99afe3452d707444afda658aca" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
|
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "80c0130c5f16b551865a69e832f1feadeedb5fbe" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "4823a251e7578a835bb979c37df390fca692ba39" },
|
||||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" },
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||||
"mini.ai": { "branch": "main", "commit": "9eae720f2b20f6ad28cbfa0ddc524e10dc2c3201" },
|
"mini.ai": { "branch": "main", "commit": "9eae720f2b20f6ad28cbfa0ddc524e10dc2c3201" },
|
||||||
"mini.icons": { "branch": "main", "commit": "efc85e42262cd0c9e1fdbf806c25cb0be6de115c" },
|
"mini.icons": { "branch": "main", "commit": "efc85e42262cd0c9e1fdbf806c25cb0be6de115c" },
|
||||||
"mini.pairs": { "branch": "main", "commit": "d5a29b6254dad07757832db505ea5aeab9aad43a" },
|
"mini.pairs": { "branch": "main", "commit": "4089aa6ea6423e02e1a8326a7a7a00159f6f5e04" },
|
||||||
"neogit": { "branch": "master", "commit": "d8bf9102692250193b855acd9025a826f1af2729" },
|
"neogit": { "branch": "master", "commit": "d8bf9102692250193b855acd9025a826f1af2729" },
|
||||||
"neotest": { "branch": "master", "commit": "deadfb1af5ce458742671ad3a013acb9a6b41178" },
|
"neotest": { "branch": "master", "commit": "deadfb1af5ce458742671ad3a013acb9a6b41178" },
|
||||||
"neotest-go": { "branch": "main", "commit": "59b50505053f9c45a9febb79e11a56206c3e3901" },
|
"neotest-go": { "branch": "main", "commit": "59b50505053f9c45a9febb79e11a56206c3e3901" },
|
||||||
@@ -40,10 +39,10 @@
|
|||||||
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
||||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||||
"nvim-lint": { "branch": "master", "commit": "ca6ea12daf0a4d92dc24c5c9ae22a1f0418ade37" },
|
"nvim-lint": { "branch": "master", "commit": "ca6ea12daf0a4d92dc24c5c9ae22a1f0418ade37" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "92ee7d42320edfbb81f3cad851314ab197fa324a" },
|
"nvim-lspconfig": { "branch": "master", "commit": "419b082102fa813739588dd82e19a8b6b2442855" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
"nvim-remote-containers": { "branch": "master", "commit": "73c2cbc59b69b4026682aea6bab225831fb8eaa4" },
|
"nvim-remote-containers": { "branch": "master", "commit": "73c2cbc59b69b4026682aea6bab225831fb8eaa4" },
|
||||||
"nvim-treesitter": { "branch": "main", "commit": "e75c007f2747050c2c620dc862c77b8f242551a8" },
|
"nvim-treesitter": { "branch": "main", "commit": "88f1dfc211c3a2fb47f1451fd5edc972ec697e58" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "4d55f63252e04c5212daed958e4e940915ff16ce" },
|
"nvim-treesitter-textobjects": { "branch": "main", "commit": "4d55f63252e04c5212daed958e4e940915ff16ce" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "db15f2e0df2f5db916e511e3fffb682ef2f6354f" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "db15f2e0df2f5db916e511e3fffb682ef2f6354f" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" },
|
"nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" },
|
||||||
@@ -52,7 +51,7 @@
|
|||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
"render-markdown.nvim": { "branch": "main", "commit": "c54380dd4d8d1738b9691a7c349ecad7967ac12e" },
|
"render-markdown.nvim": { "branch": "main", "commit": "c54380dd4d8d1738b9691a7c349ecad7967ac12e" },
|
||||||
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
|
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "0d8b6eaa0b5ae6bb3d9785f7a3ba4a4c6c1b1af2" },
|
"telescope.nvim": { "branch": "master", "commit": "ad7d9580338354ccc136e5b8f0aa4f880434dcdc" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
|
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
local augroup = vim.api.nvim_create_augroup
|
local augroup = vim.api.nvim_create_augroup
|
||||||
local autocmd = vim.api.nvim_create_autocmd
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
-- General UX
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
-- Highlight on yank
|
-- Highlight on yank
|
||||||
augroup("YankHighlight", { clear = true })
|
augroup("YankHighlight", { clear = true })
|
||||||
autocmd("TextYankPost", {
|
autocmd("TextYankPost", {
|
||||||
@@ -72,13 +76,17 @@ autocmd("BufWritePre", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
-- Filetype-specific settings
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
-- Set specific options for certain filetypes
|
-- Set specific options for certain filetypes
|
||||||
augroup("FileTypeSettings", { clear = true })
|
augroup("FileTypeSettings", { clear = true })
|
||||||
|
|
||||||
-- Go files: use tabs
|
-- Go + Makefile files: use tabs
|
||||||
autocmd("FileType", {
|
autocmd("FileType", {
|
||||||
group = "FileTypeSettings",
|
group = "FileTypeSettings",
|
||||||
pattern = "go",
|
pattern = { "go", "make" },
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.opt_local.expandtab = false
|
vim.opt_local.expandtab = false
|
||||||
vim.opt_local.tabstop = 4
|
vim.opt_local.tabstop = 4
|
||||||
@@ -86,18 +94,7 @@ autocmd("FileType", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Makefile: use tabs
|
-- Markdown: soft wrap + spell
|
||||||
autocmd("FileType", {
|
|
||||||
group = "FileTypeSettings",
|
|
||||||
pattern = "make",
|
|
||||||
callback = function()
|
|
||||||
vim.opt_local.expandtab = false
|
|
||||||
vim.opt_local.tabstop = 4
|
|
||||||
vim.opt_local.shiftwidth = 4
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Markdown: enable wrap
|
|
||||||
autocmd("FileType", {
|
autocmd("FileType", {
|
||||||
group = "FileTypeSettings",
|
group = "FileTypeSettings",
|
||||||
pattern = "markdown",
|
pattern = "markdown",
|
||||||
@@ -107,6 +104,19 @@ autocmd("FileType", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- SQL family: skip autoformat-on-save (LazyVim's pipeline respects vim.b.autoformat)
|
||||||
|
autocmd("FileType", {
|
||||||
|
group = "FileTypeSettings",
|
||||||
|
pattern = { "sql", "mysql", "plsql" },
|
||||||
|
callback = function()
|
||||||
|
vim.b.autoformat = false
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
-- Project / tooling hints
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
autocmd("DirChanged", {
|
autocmd("DirChanged", {
|
||||||
callback = function()
|
callback = function()
|
||||||
if vim.fn.filereadable(".devcontainer/devcontainer.json") == 1 then
|
if vim.fn.filereadable(".devcontainer/devcontainer.json") == 1 then
|
||||||
@@ -122,21 +132,7 @@ autocmd("BufRead", {
|
|||||||
local name = vim.fn.fnamemodify(args.file, ":t")
|
local name = vim.fn.fnamemodify(args.file, ":t")
|
||||||
vim.notify(
|
vim.notify(
|
||||||
"Generated " .. name .. ". Use: `go tool pprof -http=:0 " .. name .. "` or `go tool trace " .. name .. "`",
|
"Generated " .. name .. ". Use: `go tool pprof -http=:0 " .. name .. "` or `go tool trace " .. name .. "`",
|
||||||
vim.log.levels.INFO)
|
vim.log.levels.INFO
|
||||||
end,
|
)
|
||||||
})
|
|
||||||
|
|
||||||
-- SQL files
|
|
||||||
autocmd("FileType", {
|
|
||||||
pattern = { "sql", "mysql", "plsql" },
|
|
||||||
callback = function()
|
|
||||||
local cmp = require("cmp")
|
|
||||||
cmp.setup.buffer({
|
|
||||||
sources = {
|
|
||||||
{ name = "vim-dadbod" },
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "buffer" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,34 +1,34 @@
|
|||||||
-- Custom keymaps
|
-- Custom keymaps
|
||||||
local map = vim.keymap.set
|
local map = vim.keymap.set
|
||||||
|
|
||||||
-- Terminal keymaps
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
-- <leader>th - Open terminal in horizontal split
|
-- Terminal
|
||||||
map("n", "<leader>th", function()
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
-- LazyVim uses <leader>t* for the Test group (neotest). Putting terminal
|
||||||
|
-- splits under capital <leader>T avoids that collision while staying mnemonic.
|
||||||
|
map("n", "<leader>Th", function()
|
||||||
vim.cmd("split | terminal")
|
vim.cmd("split | terminal")
|
||||||
vim.cmd("startinsert")
|
vim.cmd("startinsert")
|
||||||
end, { desc = "Terminal (horizontal split)" })
|
end, { desc = "Terminal (horizontal split)" })
|
||||||
|
|
||||||
-- <leader>tv - Open terminal in vertical split
|
map("n", "<leader>Tv", function()
|
||||||
map("n", "<leader>tv", function()
|
|
||||||
vim.cmd("vsplit | terminal")
|
vim.cmd("vsplit | terminal")
|
||||||
vim.cmd("startinsert")
|
vim.cmd("startinsert")
|
||||||
end, { desc = "Terminal (vertical split)" })
|
end, { desc = "Terminal (vertical split)" })
|
||||||
|
|
||||||
-- Terminal mode: Escape to normal mode
|
|
||||||
map("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
|
map("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
|
||||||
|
|
||||||
-- Explorer keymaps (Snacks explorer)
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
-- Ctrl+Shift+e - Toggle explorer
|
-- Explorer (Snacks)
|
||||||
map("n", "<C-S-e>", function() Snacks.explorer() end, { desc = "Toggle Explorer" })
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
map("i", "<C-S-e>", function() Snacks.explorer() end, { desc = "Toggle Explorer" })
|
map({ "n", "i" }, "<C-e>", function()
|
||||||
|
Snacks.explorer()
|
||||||
|
end, { desc = "Toggle Explorer" })
|
||||||
|
|
||||||
-- Note: Ctrl+Shift+v and Ctrl+Shift+h for opening files in splits
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
-- are configured in the snacks picker config (lua/plugins/editor.lua)
|
-- Window navigation
|
||||||
-- as they need to work within the explorer buffer context
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
map("n", "<C-h>", "<C-w>h", { desc = "Go left window" })
|
||||||
-- Additional useful keymaps
|
|
||||||
-- Better window navigation
|
|
||||||
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window" })
|
|
||||||
map("n", "<C-j>", "<C-w>j", { desc = "Go to lower window" })
|
map("n", "<C-j>", "<C-w>j", { desc = "Go to lower window" })
|
||||||
map("n", "<C-k>", "<C-w>k", { desc = "Go to upper window" })
|
map("n", "<C-k>", "<C-w>k", { desc = "Go to upper window" })
|
||||||
map("n", "<C-l>", "<C-w>l", { desc = "Go to right window" })
|
map("n", "<C-l>", "<C-w>l", { desc = "Go to right window" })
|
||||||
@@ -39,75 +39,127 @@ map("n", "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease window height" })
|
|||||||
map("n", "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease window width" })
|
map("n", "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease window width" })
|
||||||
map("n", "<C-Right>", "<cmd>vertical resize +2<cr>", { desc = "Increase window width" })
|
map("n", "<C-Right>", "<cmd>vertical resize +2<cr>", { desc = "Increase window width" })
|
||||||
|
|
||||||
-- Buffer navigation
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
map("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
|
-- Buffers / editing
|
||||||
map("n", "<S-l>", "<cmd>bnext<cr>", { desc = "Next buffer" })
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
map("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
|
||||||
|
map("n", "<S-l>", "<cmd>bnext<cr>", { desc = "Next Buffer" })
|
||||||
|
|
||||||
-- Clear search highlight
|
|
||||||
map("n", "<Esc>", "<cmd>nohlsearch<cr>", { desc = "Clear search highlight" })
|
map("n", "<Esc>", "<cmd>nohlsearch<cr>", { desc = "Clear search highlight" })
|
||||||
|
|
||||||
-- Save file
|
|
||||||
map({ "n", "i", "v", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
|
map({ "n", "i", "v", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
|
||||||
|
|
||||||
-- Better indenting in visual mode
|
map("v", "<", "<gv", { desc = "Indent left, keep selection" })
|
||||||
map("v", "<", "<gv")
|
map("v", ">", ">gv", { desc = "Indent right, keep selection" })
|
||||||
map("v", ">", ">gv")
|
|
||||||
|
|
||||||
-- Move lines up/down
|
|
||||||
map("n", "<A-j>", "<cmd>m .+1<cr>==", { desc = "Move line down" })
|
map("n", "<A-j>", "<cmd>m .+1<cr>==", { desc = "Move line down" })
|
||||||
map("n", "<A-k>", "<cmd>m .-2<cr>==", { desc = "Move line up" })
|
map("n", "<A-k>", "<cmd>m .-2<cr>==", { desc = "Move line up" })
|
||||||
map("v", "<A-j>", ":m '>+1<cr>gv=gv", { desc = "Move selection down" })
|
map("n", "<A-j>", ":m '>+1<cr>gv=gv", { desc = "Move selection down" })
|
||||||
map("v", "<A-k>", ":m '<-2<cr>gv=gv", { desc = "Move selection up" })
|
map("n", "<A-k>", ":m '<-2<cr>gv=gv", { desc = "Move selection up" })
|
||||||
|
|
||||||
-- Quick access to AI chat
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
map("n", "<leader>aa", "<cmd>AvanteAsk<cr>", { desc = "AI Ask" })
|
-- AI (OpenCode)
|
||||||
map("v", "<leader>aa", "<cmd>AvanteAsk<cr>", { desc = "AI Ask (selection)" })
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
map("n", "<leader>ac", "<cmd>AvanteChat<cr>", { desc = "AI Chat" })
|
map({ "n", "x" }, "<leader>aa", function()
|
||||||
map("n", "<leader>at", "<cmd>AvanteToggle<cr>", { desc = "AI Toggle" })
|
require("opencode").ask("@this: ", { submit = true })
|
||||||
|
end, { desc = "AI Ask" })
|
||||||
|
map({ "n", "x" }, "<leader>ax", function()
|
||||||
|
require("opencode").select()
|
||||||
|
end, { desc = "AI Ask (selection)" })
|
||||||
|
map({ "n", "t" }, "<leader>at", function()
|
||||||
|
require("opencode").toggle()
|
||||||
|
end, { desc = "AI Toggle" })
|
||||||
|
|
||||||
-- Database keymaps
|
map({ "n", "x" }, "go", function()
|
||||||
map("n", "<leader>db", "<cmd>DBUIToggle<cr>", { desc = "Toggle DB UI" })
|
return require("opencode").operator("@this ")
|
||||||
map("n", "<leader>da", "<cmd>DBUIAddConnection<cr>", { desc = "Add DB Connection" })
|
end, { desc = "Add range to AI chat", expr = true })
|
||||||
|
map("n", "goo", function()
|
||||||
|
return require("opencode").operator("@this ") .. "_"
|
||||||
|
end, { desc = "Add line to AI chat", expr = true })
|
||||||
|
|
||||||
-- Neotest
|
map("n", "<S-C-u>", function()
|
||||||
local neotest = require("neotest")
|
require("opencode").command("sesion.half.page.up")
|
||||||
|
end, { desc = "Scroll AI chat up" })
|
||||||
|
map("n", "<S-C-d>", function()
|
||||||
|
require("opencode").command("session.half.page.down")
|
||||||
|
end, { desc = "Scroll AI chat down" })
|
||||||
|
|
||||||
map("n", "<leader>tt", neotest.run.run, { desc = "Run nearest test" })
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
-- Database (vim-dadbod)
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
-- Moved off <leader>db to free that for the DAP breakpoint default.
|
||||||
|
map("n", "<leader>Du", "<cmd>DBUIToggle<cr>", { desc = "Toggle DB UI" })
|
||||||
|
map("n", "<leader>Da", "<cmd>DBUIAddConnection<cr>", { desc = "Add DB Connection" })
|
||||||
|
map("n", "<leader>Df", "<cmd>DBUIFindBuffer<cr>", { desc = "Find DB Buffer" })
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
-- Tests (neotest)
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
-- IMPORTANT: do NOT `require("neotest")` at module top — it eager-loads the
|
||||||
|
-- plugin on every startup. Wrap each binding in a function so the require
|
||||||
|
-- happens at keypress time, letting Lazy.nvim load on demand.
|
||||||
|
map("n", "<leader>tt", function()
|
||||||
|
require("neotest").run.run()
|
||||||
|
end, { desc = "Run nearest test" })
|
||||||
map("n", "<leader>tf", function()
|
map("n", "<leader>tf", function()
|
||||||
neotest.run.run(vim.fn.expand("%"))
|
require("neotest").run.run(vim.fn.expand("%"))
|
||||||
end, { desc = "Run test file" })
|
end, { desc = "Run test file" })
|
||||||
|
map("n", "<leader>ts", function()
|
||||||
map("n", "<leader>ts", neotest.summary.toggle)
|
require("neotest").summary.toggle()
|
||||||
map("n", "<leader>to", neotest.output.open)
|
end, { desc = "Toggle test summary" })
|
||||||
|
map("n", "<leader>to", function()
|
||||||
|
require("neotest").output.open()
|
||||||
|
end, { desc = "Open test output" })
|
||||||
map("n", "<leader>tc", "<cmd>Coverage<cr>", { desc = "Show coverage" })
|
map("n", "<leader>tc", "<cmd>Coverage<cr>", { desc = "Show coverage" })
|
||||||
|
|
||||||
-- Go benchmark
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
map("n", "<leader>gb", function()
|
-- Go: benchmarks & profiling
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
-- Using <leader>cg* (Code > Go) to avoid colliding with Git's <leader>g group.
|
||||||
|
map("n", "<leader>cgb", function()
|
||||||
vim.cmd("!go test -bench=. -benchmem ./...")
|
vim.cmd("!go test -bench=. -benchmem ./...")
|
||||||
end, { desc = "Go benchmarks" })
|
end, { desc = "Go benchmarks" })
|
||||||
map("n", "<leader>gpc", function()
|
map("n", "<leader>cgpc", function()
|
||||||
vim.cmd("!go test -run=^$ -bench=. -cpuprofile cpu.out ./...")
|
vim.cmd("!go test -run=^$ -bench=. -cpuprofile cpu.out ./...")
|
||||||
end, { desc = "Go CPU profile" })
|
end, { desc = "Go CPU profile" })
|
||||||
map("n", "<leadger>gpm", function()
|
map("n", "<leader>cgpm", function()
|
||||||
vim.cmd("!go test -run=^$ -bench=. -memprofile mem.out ./...")
|
vim.cmd("!go test -run=^$ -bench=. -memprofile mem.out ./...")
|
||||||
end, { desc = "Go memory profile" })
|
end, { desc = "Go memory profile" })
|
||||||
map("n", "<leader>gpt", function()
|
map("n", "<leader>cgpt", function()
|
||||||
vim.cmd("!go test -run=^$ -bench. -trace trace.out ./...")
|
vim.cmd("!go test -run=^$ -bench=. -trace trace.out ./...")
|
||||||
end, { desc = "Go trace profile" })
|
end, { desc = "Go trace profile" })
|
||||||
|
|
||||||
-- Overseer
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
map("n", "<leader>or", "<cmd>OverseerRun<cr>", { desc = "Run task" })
|
-- Zig: build / run / test
|
||||||
map("n", "<leader>ot", "<cmd>OverseerToogle<cr>", { desc = "Task list" })
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
-- Mirrors the Go <leader>cg* layout: <leader>cz* (Code > Zig).
|
||||||
|
-- These are quick one-shot runs; for the mouse-driven task picker use <leader>or (OverseerRun),
|
||||||
|
-- which lists the zig: build/run/test templates from lua/overseer/template/user
|
||||||
|
map("n", "<leader>czb", "<cmd>!zig build<cr>", { desc = "Zig build" })
|
||||||
|
map("n", "<leader>czr", "<cmd>!zig build run<cr>", { desc = "Zig build run" })
|
||||||
|
map("n", "<leader>czt", "<cmd>!zig build test<cr>", { desc = "Zig build test" })
|
||||||
|
|
||||||
-- Aerial
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
-- Overseer
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
map("n", "<leader>or", "<cmd>OverseerRun<cr>", { desc = "Run task" })
|
||||||
|
map("n", "<leader>ot", "<cmd>OverseerToggle<cr>", { desc = "Task list" })
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
-- Symbols / outline
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
map("n", "<leader>so", "<cmd>AerialToggle<cr>", { desc = "Symbols outline" })
|
map("n", "<leader>so", "<cmd>AerialToggle<cr>", { desc = "Symbols outline" })
|
||||||
map("n", "<leader>sh", vim.lsp.buf.incoming_calls, { desc = "Incoming calls" })
|
map("n", "<leader>sh", vim.lsp.buf.incoming_calls, { desc = "Incoming calls" })
|
||||||
map("n", "<leader>sc", vim.lsp.buf.outgoing_calls, { desc = "Outgoing calls" })
|
map("n", "<leader>sc", vim.lsp.buf.outgoing_calls, { desc = "Outgoing calls" })
|
||||||
|
|
||||||
-- Diagnostics
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
map("n", "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>")
|
-- Diagnostics (Trouble)
|
||||||
map("n", "<leader>xw", "<cmd>Trouble workspace_diagnostics<cr>")
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
map("n", "<leader>xt", "<cmd>Trouble todo<cr>")
|
map("n", "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", { desc = "Diagnostics (Trouble)" })
|
||||||
|
map("n", "<leader>xw", "<cmd>Trouble workspace_diagnostics<cr>", { desc = "Workspace diagnostics" })
|
||||||
|
map("n", "<leader>xt", "<cmd>Trouble todo<cr>", { desc = "TODOs (Trouble)" })
|
||||||
|
|
||||||
-- Git Support
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
map("n", "<leader>gg", "<cmd>Neogit<cr>", { desc = "Neogit"})
|
-- Git
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
-- LazyVim's <leader>gg is lazygit by default; mapping Neogit to <leader>gn.
|
||||||
|
map("n", "<leader>gn", "<cmd>Neogit<cr>", { desc = "Neogit" })
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|||||||
if vim.v.shell_error ~= 0 then
|
if vim.v.shell_error ~= 0 then
|
||||||
vim.api.nvim_echo({
|
vim.api.nvim_echo({
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
{ out, "WarningMsg" },
|
{ out, "WarningMsg" },
|
||||||
{ "\nPress any key to exit..." },
|
{ "\nPress any key to exit..." },
|
||||||
}, true, {})
|
}, true, {})
|
||||||
vim.fn.getchar()
|
vim.fn.getchar()
|
||||||
@@ -27,7 +27,7 @@ require("lazy").setup({
|
|||||||
"LazyVim/LazyVim",
|
"LazyVim/LazyVim",
|
||||||
import = "lazyvim.plugins",
|
import = "lazyvim.plugins",
|
||||||
opts = {
|
opts = {
|
||||||
colorscheme = "tokyonight",
|
colorscheme = "catppuccin-mocha",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- Import LazyVim extras for languages
|
-- Import LazyVim extras for languages
|
||||||
@@ -46,7 +46,7 @@ require("lazy").setup({
|
|||||||
lazy = false,
|
lazy = false,
|
||||||
version = false,
|
version = false,
|
||||||
},
|
},
|
||||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
install = { colorscheme = { "tokyonight", "habamax", "catpuccin-mocha" } },
|
||||||
checker = {
|
checker = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
notify = false,
|
notify = false,
|
||||||
|
|||||||
@@ -10,33 +10,33 @@ end
|
|||||||
|
|
||||||
-- General
|
-- General
|
||||||
opt.clipboard = "unnamedplus" -- Sync with system clipboard
|
opt.clipboard = "unnamedplus" -- Sync with system clipboard
|
||||||
opt.confirm = true -- Confirm before closing unsaved buffer
|
opt.confirm = true -- Confirm before closing unsaved buffer
|
||||||
opt.cursorline = true -- Highlight current line
|
opt.cursorline = true -- Highlight current line
|
||||||
opt.mouse = "a" -- Enable mouse
|
opt.mouse = "a" -- Enable mouse
|
||||||
opt.number = true -- Show line numbers
|
opt.number = true -- Show line numbers
|
||||||
opt.relativenumber = true -- Relative line numbers
|
opt.relativenumber = true -- Relative line numbers
|
||||||
opt.signcolumn = "yes" -- Always show sign column
|
opt.signcolumn = "yes" -- Always show sign column
|
||||||
opt.termguicolors = true -- True color support
|
opt.termguicolors = true -- True color support
|
||||||
opt.wrap = true -- Disable line wrap
|
opt.wrap = true -- Enable line wrap
|
||||||
|
|
||||||
-- Indentation
|
-- Indentation
|
||||||
opt.expandtab = true -- Use spaces instead of tabs
|
opt.expandtab = true -- Use spaces instead of tabs
|
||||||
opt.shiftwidth = 2 -- Size of indent
|
opt.shiftwidth = 2 -- Size of indent
|
||||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
opt.tabstop = 4 -- Number of spaces tabs count for
|
||||||
opt.smartindent = true -- Smart indentation
|
opt.smartindent = true -- Smart indentation
|
||||||
|
|
||||||
-- Search
|
-- Search
|
||||||
opt.ignorecase = true -- Ignore case
|
opt.ignorecase = true -- Ignore case
|
||||||
opt.smartcase = true -- Don't ignore case with capitals
|
opt.smartcase = true -- Don't ignore case with capitals
|
||||||
opt.hlsearch = true -- Highlight search results
|
opt.hlsearch = true -- Highlight search results
|
||||||
opt.incsearch = true -- Show search results as you type
|
opt.incsearch = true -- Show search results as you type
|
||||||
|
|
||||||
-- Split behavior
|
-- Split behavior
|
||||||
opt.splitbelow = true -- Put new windows below current
|
opt.splitbelow = true -- Put new windows below current
|
||||||
opt.splitright = true -- Put new windows right of current
|
opt.splitright = true -- Put new windows right of current
|
||||||
|
|
||||||
-- Undo
|
-- Undo
|
||||||
opt.undofile = true -- Persistent undo
|
opt.undofile = true -- Persistent undo
|
||||||
opt.undolevels = 10000 -- Maximum undo levels
|
opt.undolevels = 10000 -- Maximum undo levels
|
||||||
|
|
||||||
-- Performance
|
-- Performance
|
||||||
@@ -63,3 +63,7 @@ vim.diagnostic.config({
|
|||||||
border = "rounded",
|
border = "rounded",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Python
|
||||||
|
vim.g.lazyvim_python_lsp = "pyright"
|
||||||
|
vim.g.lazyvim_python_ruff = "ruff"
|
||||||
|
|||||||
21
lua/overseer/template/user/zig_build.lua
Normal file
21
lua/overseer/template/user/zig_build.lua
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
return {
|
||||||
|
name = "zig: build",
|
||||||
|
desc = "Build the project (zig build)",
|
||||||
|
-- Only offered as a task when a build.zig is present in the project root.
|
||||||
|
condition = {
|
||||||
|
callback = function()
|
||||||
|
return vim.fn.filereadable(vim.fn.getcwd() .. "/build.zig") == 1
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
builder = function()
|
||||||
|
return {
|
||||||
|
cmd = { "zig" },
|
||||||
|
args = { "build" },
|
||||||
|
components = {
|
||||||
|
"default",
|
||||||
|
"on_output_quickfix",
|
||||||
|
{ "on_complete_notify", statuses = { "SUCCESS", "FAILURE" } },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
20
lua/overseer/template/user/zig_run.lua
Normal file
20
lua/overseer/template/user/zig_run.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
return {
|
||||||
|
name = "zig: run",
|
||||||
|
desc = "Build and run (zig build run)",
|
||||||
|
condition = {
|
||||||
|
callback = function()
|
||||||
|
return vim.fn.filereadable(vim.fn.getcwd() .. "/build.zig") == 1
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
builder = function()
|
||||||
|
return {
|
||||||
|
cmd = { "zig" },
|
||||||
|
args = { "build", "run" },
|
||||||
|
components = {
|
||||||
|
"default",
|
||||||
|
"on_output_quickfix",
|
||||||
|
{ "on_complete_notify", statuses = { "SUCCESS", "FAILURE" } },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
20
lua/overseer/template/user/zig_test.lua
Normal file
20
lua/overseer/template/user/zig_test.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
return {
|
||||||
|
name = "zig: test",
|
||||||
|
desc = "Run the test step (zig build test)",
|
||||||
|
condition = {
|
||||||
|
callback = function()
|
||||||
|
return vim.fn.filereadable(vim.fn.getcwd() .. "/build.zig") == 1
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
builder = function()
|
||||||
|
return {
|
||||||
|
cmd = { "zig" },
|
||||||
|
args = { "build", "test" },
|
||||||
|
components = {
|
||||||
|
"default",
|
||||||
|
"on_output_quickfix",
|
||||||
|
{ "on_complete_notify", statuses = { "SUCCESS", "FAILURE" } },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -1,213 +1,65 @@
|
|||||||
-- AI Chat Integration using avante.nvim
|
|
||||||
-- Supports: Anthropic Claude, OpenAI, Google Gemini, Copilot, and more
|
|
||||||
-- API keys via environment variables:
|
|
||||||
-- ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY
|
|
||||||
-- Or scoped: AVANTE_ANTHROPIC_API_KEY, AVANTE_OPENAI_API_KEY, etc.
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"yetone/avante.nvim",
|
"nickjvandyke/opencode.nvim",
|
||||||
event = "VeryLazy",
|
version = "v0.10.1",
|
||||||
version = false, -- Never set to "*"
|
|
||||||
build = "make",
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
"stevearc/dressing.nvim",
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
"nvim-tree/nvim-web-devicons",
|
|
||||||
{
|
{
|
||||||
-- Image support (optional)
|
---@module "snacks"
|
||||||
"HakonHarnes/img-clip.nvim",
|
"folke/snacks.nvim",
|
||||||
event = "VeryLazy",
|
optional = true,
|
||||||
opts = {
|
opts = {
|
||||||
default = {
|
input = {}, -- Enhances `ask()`
|
||||||
embed_image_as_base64 = false,
|
picker = { -- Enhances `select()`
|
||||||
prompt_for_file_name = false,
|
actions = {
|
||||||
drag_and_drop = {
|
opencode_send = function(...)
|
||||||
insert_mode = true,
|
return require("opencode").snacks_picker_send(...)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
win = {
|
||||||
|
input = {
|
||||||
|
keys = {
|
||||||
|
["<a-a>"] = { "opencode_send", mode = { "n", "i" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
-- Markdown rendering in Avante
|
|
||||||
"MeanderingProgrammer/render-markdown.nvim",
|
|
||||||
opts = {
|
|
||||||
file_types = { "markdown", "Avante" },
|
|
||||||
},
|
|
||||||
ft = { "markdown", "Avante" },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
---@module 'avante'
|
config = function()
|
||||||
---@type avante.Config
|
local opencode_cmd = "opencode --port"
|
||||||
opts = {
|
---@type snacks.terminal.Opts
|
||||||
-- Default provider (switch with :AvanteProvider command)
|
local snacks_terminal_opts = {
|
||||||
-- Options: "claude", "openai", "azure", "gemini", "copilot", "cohere"
|
win = {
|
||||||
provider = "openai",
|
position = "right",
|
||||||
|
enter = false,
|
||||||
|
on_win = function(win)
|
||||||
|
-- Set up keymaps and cleanup for an arbitary terminal
|
||||||
|
require("opencode.terminal").setup(win.win)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
-- Provider configurations
|
---@type opencode.Opts
|
||||||
providers = {
|
vim.g.opencode_opts = {
|
||||||
claude = {
|
-- Specific configuration around opencode
|
||||||
endpoint = "https://api.anthropic.com",
|
server = {
|
||||||
model = "claude-sonnet-4-5-20250929",
|
start = function()
|
||||||
timeout = 30000,
|
require("snacks.terminal").open(opencode_cmd, snacks_terminal_opts)
|
||||||
extra_request_body = {
|
end,
|
||||||
temperature = 0.75,
|
stop = function()
|
||||||
max_tokens = 20480,
|
require("snacks.terminal").get(opencode_cmd, snacks_terminal_opts):close()
|
||||||
},
|
end,
|
||||||
|
toggle = function()
|
||||||
|
require("snacks.terminal").toggle(opencode_cmd, snacks_terminal_opts)
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
openai = {
|
lsp = {
|
||||||
endpoint = "https://api.openai.com/v1",
|
|
||||||
model = "gpt-4o-mini",
|
|
||||||
timeout = 30000,
|
|
||||||
extra_request_body = {
|
|
||||||
temperature = 0.75,
|
|
||||||
max_completion_tokens = 16384,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
azure = {
|
|
||||||
endpoint = "", -- e.g., "https://<resource>.openai.azure.com"
|
|
||||||
deployment = "", -- Azure deployment name
|
|
||||||
api_version = "2024-12-01-preview",
|
|
||||||
timeout = 30000,
|
|
||||||
extra_request_body = {
|
|
||||||
temperature = 0.75,
|
|
||||||
max_completion_tokens = 16384,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
gemini = {
|
|
||||||
endpoint = "https://generativelanguage.googleapis.com/v1beta/models",
|
|
||||||
model = "gemini-2.0-flash",
|
|
||||||
timeout = 30000,
|
|
||||||
extra_request_body = {
|
|
||||||
generationConfig = {
|
|
||||||
temperature = 0.75,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
copilot = {
|
|
||||||
endpoint = "https://api.githubcopilot.com",
|
|
||||||
model = "gpt-4o-2024-08-06",
|
|
||||||
timeout = 30000,
|
|
||||||
extra_request_body = {
|
|
||||||
temperature = 0.75,
|
|
||||||
max_tokens = 20480,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- Custom provider example for Ollama (local models)
|
|
||||||
-- Uncomment and configure if using local LLMs
|
|
||||||
-- ollama = {
|
|
||||||
-- __inherited_from = "openai",
|
|
||||||
-- endpoint = "http://localhost:11434/v1",
|
|
||||||
-- model = "llama3.2",
|
|
||||||
-- api_key_name = "",
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Behavior settings
|
|
||||||
behaviour = {
|
|
||||||
auto_suggestions = false, -- Set true for copilot-like suggestions
|
|
||||||
auto_set_highlight_group = true,
|
|
||||||
auto_set_keymaps = true,
|
|
||||||
auto_apply_diff_after_generation = false,
|
|
||||||
support_paste_from_clipboard = false,
|
|
||||||
minimize_diff = true,
|
|
||||||
enable_token_counting = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Mappings
|
|
||||||
mappings = {
|
|
||||||
diff = {
|
|
||||||
ours = "co",
|
|
||||||
theirs = "ct",
|
|
||||||
all_theirs = "ca",
|
|
||||||
both = "cb",
|
|
||||||
cursor = "cc",
|
|
||||||
next = "]x",
|
|
||||||
prev = "[x",
|
|
||||||
},
|
|
||||||
suggestion = {
|
|
||||||
accept = "<M-l>",
|
|
||||||
next = "<M-]>",
|
|
||||||
prev = "<M-[>",
|
|
||||||
dismiss = "<C-]>",
|
|
||||||
},
|
|
||||||
jump = {
|
|
||||||
next = "]]",
|
|
||||||
prev = "[[",
|
|
||||||
},
|
|
||||||
submit = {
|
|
||||||
normal = "<CR>",
|
|
||||||
insert = "<C-s>",
|
|
||||||
},
|
|
||||||
sidebar = {
|
|
||||||
apply_all = "A",
|
|
||||||
apply_cursor = "a",
|
|
||||||
switch_windows = "<Tab>",
|
|
||||||
reverse_switch_windows = "<S-Tab>",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Hints shown in the UI
|
|
||||||
hints = { enabled = true },
|
|
||||||
|
|
||||||
-- Window configuration
|
|
||||||
windows = {
|
|
||||||
position = "right",
|
|
||||||
wrap = true,
|
|
||||||
width = 30,
|
|
||||||
sidebar_header = {
|
|
||||||
enabled = true,
|
enabled = true,
|
||||||
align = "center",
|
|
||||||
rounded = true,
|
|
||||||
},
|
},
|
||||||
input = {
|
}
|
||||||
prefix = "> ",
|
|
||||||
height = 8,
|
|
||||||
},
|
|
||||||
edit = {
|
|
||||||
border = "rounded",
|
|
||||||
start_insert = true,
|
|
||||||
},
|
|
||||||
ask = {
|
|
||||||
floating = false,
|
|
||||||
start_insert = true,
|
|
||||||
border = "rounded",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Highlight groups
|
vim.o.autoread = true -- Required for `opts.events.reload`
|
||||||
highlights = {
|
end,
|
||||||
diff = {
|
|
||||||
current = "DiffText",
|
|
||||||
incoming = "DiffAdd",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Diff settings
|
|
||||||
diff = {
|
|
||||||
autojump = true,
|
|
||||||
list_opener = "copen",
|
|
||||||
override_timeoutlen = 500,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"zbirenbaum/copilot.lua",
|
|
||||||
cmd = "Copilot",
|
|
||||||
event = "InsertEnter",
|
|
||||||
opts = {
|
|
||||||
suggestion = {
|
|
||||||
enabled = true,
|
|
||||||
auto_trigger = true,
|
|
||||||
keymap = {
|
|
||||||
accept = "<C-l>",
|
|
||||||
next = "<C-n>",
|
|
||||||
prev = "<C-p>",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
panel = { enabled = false },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
-- Database integration with vim-dadbod
|
-- Database integration with vim-dadbod
|
||||||
-- Supports PostgreSQL, MySQL, SQLite, and more
|
-- Supports PostgreSQL, MySQL, SQLite, and more
|
||||||
|
-- All three plugins are lazy-loaded:
|
||||||
|
-- - vim-dadbod loads on :DB / :DBUI* commands
|
||||||
|
-- - dadbod-ui loads on its own UI commands
|
||||||
|
-- dadbod-completion loads on sql/mysql/plsql filetypes
|
||||||
|
--
|
||||||
|
-- Keymaps live in config/keymaps.lua under the <leader>D group.
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- Core dadbod plugin
|
-- Core dadbod plugin
|
||||||
@@ -13,7 +19,8 @@ return {
|
|||||||
"kristijanhusak/vim-dadbod-ui",
|
"kristijanhusak/vim-dadbod-ui",
|
||||||
cmd = { "DBUI", "DBUIToggle", "DBUIAddConnection", "DBUIFindBuffer" },
|
cmd = { "DBUI", "DBUIToggle", "DBUIAddConnection", "DBUIFindBuffer" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "tpope/vim-dadbod", lazy = true },
|
"tpope/vim-dadbod",
|
||||||
|
{ "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" } },
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
-- UI configuration
|
-- UI configuration
|
||||||
@@ -41,44 +48,20 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Autocompletion for dadbod
|
-- Completion
|
||||||
{
|
{
|
||||||
"kristijanhusak/vim-dadbod-completion",
|
"saghen/blink.cmp",
|
||||||
dependencies = {
|
opts = {
|
||||||
"tpope/vim-dadbod",
|
sources = {
|
||||||
"hrsh7th/nvim-cmp",
|
default = { "lsp", "path", "snippets", "buffer" },
|
||||||
|
per_filetype = {
|
||||||
|
sql = { "snippets", "dadbod", "buffer" },
|
||||||
|
},
|
||||||
|
-- add vim-dadbod-completion to your completion providers
|
||||||
|
providers = {
|
||||||
|
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
ft = { "sql", "mysql", "plsql" },
|
|
||||||
init = function()
|
|
||||||
-- Setup completion for SQL files
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = { "sql", "mysql", "plsql" },
|
|
||||||
callback = function()
|
|
||||||
local cmp = require("cmp")
|
|
||||||
local sources = cmp.get_config().sources or {}
|
|
||||||
|
|
||||||
-- Add dadbod completion source
|
|
||||||
table.insert(sources, { name = "vim-dadbod-completion" })
|
|
||||||
|
|
||||||
cmp.setup.buffer({
|
|
||||||
sources = cmp.config.sources(sources),
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Add dadbod-completion to nvim-cmp sources
|
|
||||||
{
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
optional = true,
|
|
||||||
dependencies = {
|
|
||||||
"kristijanhusak/vim-dadbod-completion",
|
|
||||||
"nvim-cmp",
|
|
||||||
},
|
|
||||||
opts = function(_, opts)
|
|
||||||
opts.sources = opts.sources or {}
|
|
||||||
table.insert(opts.sources, { name = "vim-dadbod-completion" })
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,115 +1,271 @@
|
|||||||
-- Debug Adapter Protocol (DAP) configuration for Go
|
-- Debug Adapter Protocol (DAP) configuration for Go & JS
|
||||||
-- Uses delve for Go debugging
|
-- Uses delve for Go debugging
|
||||||
|
-- Loads only when a <leader>d* key is pressed (see keys = {...} below).
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- nvim-dap configuration
|
-- ─────────────────────────────────────────────────────────────────────────
|
||||||
|
-- Core DAP + Go adapter + UI extras
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Go-specific DAP configuration
|
-- Fold these under nvim-dap so they share its keys-based lazy trigger
|
||||||
|
-- instead of loading eagerly at startup.
|
||||||
|
{ "rcarriga/nvim-dap-ui", dependencies = { "nvim-neotest/nvim-nio" } },
|
||||||
|
"theHamsta/nvim-dap-virtual-text",
|
||||||
|
"jay-babu/mason-nvim-dap.nvim",
|
||||||
{
|
{
|
||||||
"leoluz/nvim-dap-go",
|
"leoluz/nvim-dap-go",
|
||||||
opts = {
|
-- IMPORTANT: opts is a FUNCTION, not a table literal.
|
||||||
-- Delve configurations
|
-- The attach config references require("dap.utils"), which must not run until
|
||||||
delve = {
|
-- nvim-dap is actually loaded.
|
||||||
-- Path to delve (uses Mason-installed by default)
|
opts = function()
|
||||||
path = "dlv",
|
return {
|
||||||
-- Initialize with default args
|
delve = {
|
||||||
initialize_timeout_sec = 20,
|
path = "dlv",
|
||||||
-- Whether to use debug adapter mode
|
initialize_timeout_sec = 20,
|
||||||
port = "${port}",
|
port = "${port}",
|
||||||
-- Build flags for delve
|
build_flags = "",
|
||||||
build_flags = "",
|
|
||||||
},
|
|
||||||
-- DAP configurations for Go
|
|
||||||
dap_configurations = {
|
|
||||||
{
|
|
||||||
type = "go",
|
|
||||||
name = "Debug",
|
|
||||||
request = "launch",
|
|
||||||
program = "${file}",
|
|
||||||
},
|
},
|
||||||
{
|
dap_configurations = {
|
||||||
type = "go",
|
{ type = "go", name = "Debug", request = "launch", program = "${file}" },
|
||||||
name = "Debug Package",
|
{ type = "go", name = "Debug Test", request = "launch", program = "${file}" },
|
||||||
request = "launch",
|
{ type = "go", name = "Debug Package", request = "launch", program = "${filDirname}" },
|
||||||
program = "${fileDirname}",
|
{
|
||||||
|
type = "go",
|
||||||
|
name = "Debug test (go.mod)",
|
||||||
|
request = "launch",
|
||||||
|
mode = "test",
|
||||||
|
program = "./${relativeFileDirname}",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "go",
|
||||||
|
name = "Attach",
|
||||||
|
request = "attach",
|
||||||
|
mode = "local",
|
||||||
|
processId = require("dap.utils").pick_process,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
}
|
||||||
type = "go",
|
end,
|
||||||
name = "Debug test",
|
|
||||||
request = "launch",
|
|
||||||
mode = "test",
|
|
||||||
program = "${file}",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "go",
|
|
||||||
name = "Debug test (go.mod)",
|
|
||||||
request = "launch",
|
|
||||||
mode = "test",
|
|
||||||
program = "./${relativeFileDirname}",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "go",
|
|
||||||
name = "Attach",
|
|
||||||
request = "attach",
|
|
||||||
mode = "local",
|
|
||||||
processId = require("dap.utils").pick_process,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
-- Debug keymaps
|
{
|
||||||
{ "<leader>dB", function() require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: ")) end, desc = "Breakpoint Condition" },
|
"<leader>dB",
|
||||||
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
|
function()
|
||||||
{ "<leader>dc", function() require("dap").continue() end, desc = "Continue" },
|
require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: "))
|
||||||
{ "<leader>dC", function() require("dap").run_to_cursor() end, desc = "Run to Cursor" },
|
end,
|
||||||
{ "<leader>dg", function() require("dap").goto_() end, desc = "Go to Line (No Execute)" },
|
desc = "Breakpoint Condition",
|
||||||
{ "<leader>di", function() require("dap").step_into() end, desc = "Step Into" },
|
},
|
||||||
{ "<leader>dj", function() require("dap").down() end, desc = "Down" },
|
{
|
||||||
{ "<leader>dk", function() require("dap").up() end, desc = "Up" },
|
"<leader>db",
|
||||||
{ "<leader>dl", function() require("dap").run_last() end, desc = "Run Last" },
|
function()
|
||||||
{ "<leader>do", function() require("dap").step_out() end, desc = "Step Out" },
|
require("dap").toggle_breakpoint()
|
||||||
{ "<leader>dO", function() require("dap").step_over() end, desc = "Step Over" },
|
end,
|
||||||
{ "<leader>dp", function() require("dap").pause() end, desc = "Pause" },
|
desc = "Toggle Breakpoint",
|
||||||
{ "<leader>dr", function() require("dap").repl.toggle() end, desc = "Toggle REPL" },
|
},
|
||||||
{ "<leader>ds", function() require("dap").session() end, desc = "Session" },
|
{
|
||||||
{ "<leader>dt", function() require("dap").terminate() end, desc = "Terminate" },
|
"<leader>dc",
|
||||||
{ "<leader>dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" },
|
function()
|
||||||
|
require("dap").continue()
|
||||||
|
end,
|
||||||
|
desc = "Continue",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>dC",
|
||||||
|
function()
|
||||||
|
require("dap").run_to_cursor()
|
||||||
|
end,
|
||||||
|
desc = "Run to Cursor",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>dg",
|
||||||
|
function()
|
||||||
|
require("dap").goto_()
|
||||||
|
end,
|
||||||
|
desc = "Go to Line (No Execute)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>di",
|
||||||
|
function()
|
||||||
|
require("dap").step_into()
|
||||||
|
end,
|
||||||
|
desc = "Step Into",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>dj",
|
||||||
|
function()
|
||||||
|
require("dap").down()
|
||||||
|
end,
|
||||||
|
desc = "Down",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>dk",
|
||||||
|
function()
|
||||||
|
require("dap").up()
|
||||||
|
end,
|
||||||
|
desc = "Up",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>dO",
|
||||||
|
function()
|
||||||
|
require("dap").step_over()
|
||||||
|
end,
|
||||||
|
desc = "Step Over",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>dp",
|
||||||
|
function()
|
||||||
|
require("dap").pause()
|
||||||
|
end,
|
||||||
|
desc = "Pause",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>dr",
|
||||||
|
function()
|
||||||
|
require("dap").repl.toggle()
|
||||||
|
end,
|
||||||
|
desc = "Toggle REPL",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>ds",
|
||||||
|
function()
|
||||||
|
require("dap").session()
|
||||||
|
end,
|
||||||
|
desc = "Session",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>dt",
|
||||||
|
function()
|
||||||
|
require("dap").terminate()
|
||||||
|
end,
|
||||||
|
desc = "Terminate",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>dw",
|
||||||
|
function()
|
||||||
|
require("dap.ui.widgets").hover()
|
||||||
|
end,
|
||||||
|
desc = "Widgets",
|
||||||
|
},
|
||||||
-- Go-specific
|
-- Go-specific
|
||||||
{ "<leader>dT", function() require("dap-go").debug_test() end, desc = "Debug Go Test" },
|
{
|
||||||
{ "<leader>dL", function() require("dap-go").debug_last_test() end, desc = "Debug Last Go Test" },
|
"<leader>dT",
|
||||||
|
function()
|
||||||
|
require("dap-go").debug_test()
|
||||||
|
end,
|
||||||
|
desc = "Debug Go Test",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>dL",
|
||||||
|
function()
|
||||||
|
require("dap-go").debug_last_test()
|
||||||
|
end,
|
||||||
|
desc = "Debug Last Go Test",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- DAP UI for better debugging experience
|
-- -------------------------------------------------------------------------
|
||||||
|
-- Zig (+ C/C++) debugging via codelldb
|
||||||
|
-- -------------------------------------------------------------------------
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
ft = { "zig" },
|
||||||
|
config = function()
|
||||||
|
local dap = require("dap")
|
||||||
|
|
||||||
|
-- Prefer codelldb on $PATH, fall back to Mason's install location
|
||||||
|
local codelldb = vim.fn.exepath("codelldb")
|
||||||
|
if codelldb == "" then
|
||||||
|
codelldb = vim.fn.stdpath("data") .. "/mason/bin/codelldb"
|
||||||
|
end
|
||||||
|
|
||||||
|
dap.adapters.codelldb = {
|
||||||
|
type = "server",
|
||||||
|
port = "${port}",
|
||||||
|
executable = {
|
||||||
|
command = codelldb,
|
||||||
|
args = { "--port", "${port}" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
dap.configurations.zig = {
|
||||||
|
{
|
||||||
|
-- Project build (build.zig). Runs `zig build` first so a fresh
|
||||||
|
-- debug binary exists, then asks which exec under zig-out/bin to run.
|
||||||
|
name = "Launch (zig build)",
|
||||||
|
type = "codelldb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
vim.fn.system({ "zig", "build", "--summary", "none" })
|
||||||
|
return vim.fn.input("Executable: ", vim.fn.getcwd() .. "/zig-out/bin/", "file")
|
||||||
|
end,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
stopOnEntry = false,
|
||||||
|
args = {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- Single file. Compiles the current .zig with debug info next to it,
|
||||||
|
-- then launches that binary.
|
||||||
|
name = "Launch (current file)",
|
||||||
|
type = "codelldb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
local src = vim.fn.expand("%:p")
|
||||||
|
local out = vim.fn.expand("%:p:r")
|
||||||
|
vim.fn.system({ "zig", "build-exe", src, "-O", "Debug", "-femit-bin=" .. out })
|
||||||
|
return out
|
||||||
|
end,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
stopOnEntry = false,
|
||||||
|
args = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Reuse the same configs for C/C++ buffers - codelldb handles them too
|
||||||
|
dap.configurations.c = dap.configurations.zig
|
||||||
|
dap.configurations.cpp = dap.configurations.zig
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────
|
||||||
|
-- DAP UI keymaps + auto open/close (the spec itself is loaded as a dep above)
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────
|
||||||
{
|
{
|
||||||
"rcarriga/nvim-dap-ui",
|
"rcarriga/nvim-dap-ui",
|
||||||
dependencies = {
|
|
||||||
"mfussenegger/nvim-dap",
|
|
||||||
"nvim-neotest/nvim-nio",
|
|
||||||
},
|
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>du", function() require("dapui").toggle({}) end, desc = "Dap UI" },
|
{
|
||||||
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = { "n", "v" } },
|
"<leader>du",
|
||||||
|
function()
|
||||||
|
require("dapui").toggle({})
|
||||||
|
end,
|
||||||
|
desc = "Dap UI",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>de",
|
||||||
|
function()
|
||||||
|
require("dapui").eval()
|
||||||
|
end,
|
||||||
|
desc = "Eval",
|
||||||
|
mode = { "n", "v" },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
layouts = {
|
layouts = {
|
||||||
{
|
{
|
||||||
elements = {
|
elements = {
|
||||||
{ id = "scopes", size = 0.25 },
|
{ id = "scopes", size = 0.25 },
|
||||||
{ id = "breakpoints", size = 0.25 },
|
{ id = "breakpoints", size = 0.25 },
|
||||||
{ id = "stacks", size = 0.25 },
|
{ id = "stacks", size = 0.25 },
|
||||||
{ id = "watches", size = 0.25 },
|
{ id = "watches", size = 0.25 },
|
||||||
},
|
},
|
||||||
position = "left",
|
position = "left",
|
||||||
size = 40,
|
size = 40,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
elements = {
|
elements = {
|
||||||
{ id = "repl", size = 0.5 },
|
{ id = "repl", size = 0.5 },
|
||||||
{ id = "console", size = 0.5 },
|
{ id = "console", size = 0.5 },
|
||||||
},
|
},
|
||||||
position = "bottom",
|
position = "bottom",
|
||||||
@@ -122,8 +278,7 @@ return {
|
|||||||
local dapui = require("dapui")
|
local dapui = require("dapui")
|
||||||
|
|
||||||
dapui.setup(opts)
|
dapui.setup(opts)
|
||||||
|
-- Auto open/close DAP UI on debug session start/end
|
||||||
-- Auto open/close DAP UI
|
|
||||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||||
dapui.open({})
|
dapui.open({})
|
||||||
end
|
end
|
||||||
@@ -135,17 +290,24 @@ return {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────
|
||||||
|
-- mason-nvim-dap: install DAP adapters via Mason
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────
|
||||||
|
-- Note: delve and js-debug-adapter are also listed in mason.lua's
|
||||||
|
-- ensure_installed (under "DAP adapters"). Either source
|
||||||
|
-- can install them; mason-nvim-dap is preferred when present because it also
|
||||||
|
-- auto-registers the adapters with nvim-dap.
|
||||||
{
|
{
|
||||||
"jay-babu/mason-nvim-dap.nvim",
|
"jay-babu/mason-nvim-dap.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = { "python", "delve", "js", "codelldb" },
|
||||||
"python",
|
|
||||||
"delve",
|
|
||||||
"js"
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- Virtual text for debugging
|
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────
|
||||||
|
-- Inline variable values during debug sessions
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────
|
||||||
{
|
{
|
||||||
"theHamsta/nvim-dap-virtual-text",
|
"theHamsta/nvim-dap-virtual-text",
|
||||||
opts = {
|
opts = {
|
||||||
|
|||||||
@@ -1,32 +1,19 @@
|
|||||||
-- Editor enhancements - Snacks explorer configuration
|
-- Editor enhancements - Snacks explorer configuration
|
||||||
-- Custom keybindings for file explorer (snacks.nvim built into LazyVim)
|
--
|
||||||
|
-- LazyVim provides snacks (explorer, picker, lazygit, terminal), native
|
||||||
|
-- commenting (Neovim 0.10+), and mini.hipatterns for color preview.
|
||||||
|
-- This file only adds project-specific overrides on top.
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
-- ─────────────────────────────────────────────────────────────────────────
|
||||||
"nvim-telescope/telescope.nvim",
|
-- Snacks: explorer + picker tweaks
|
||||||
opts = {
|
-- ─────────────────────────────────────────────────────────────────────────
|
||||||
defaults = {
|
|
||||||
hidden = true,
|
|
||||||
file_ignore_patterns = {},
|
|
||||||
},
|
|
||||||
pickers = {
|
|
||||||
find_files = {
|
|
||||||
hidden = true,
|
|
||||||
no_ignore = true,
|
|
||||||
no_ignore_parent = true,
|
|
||||||
},
|
|
||||||
live_grep = {
|
|
||||||
additional_args = function()
|
|
||||||
return { "--hidden", "--no-ignore" }
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- Configure snacks.nvim explorer (already included in LazyVim)
|
|
||||||
{
|
{
|
||||||
"folke/snacks.nvim",
|
"folke/snacks.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
|
quickfile = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
explorer = {
|
explorer = {
|
||||||
replace_netrw = true,
|
replace_netrw = true,
|
||||||
},
|
},
|
||||||
@@ -34,21 +21,21 @@ return {
|
|||||||
enabled = true,
|
enabled = true,
|
||||||
},
|
},
|
||||||
picker = {
|
picker = {
|
||||||
|
enabled = true,
|
||||||
|
ui_select = true,
|
||||||
sources = {
|
sources = {
|
||||||
explorer = {
|
explorer = {
|
||||||
-- Explorer picker configuration
|
|
||||||
hidden = true,
|
hidden = true,
|
||||||
ignored = true, -- Show files ignored by .gitignore
|
ignored = true, -- show .gitignore files too
|
||||||
follow_file = true,
|
follow_file = true,
|
||||||
-- Custom keymaps within the explorer
|
|
||||||
win = {
|
win = {
|
||||||
list = {
|
list = {
|
||||||
keys = {
|
keys = {
|
||||||
-- Ctrl+Shift+v - Open in vertical split
|
-- Ctrl+Shift versions (work in Kitty/WezTerm/Alacritty with the right config)
|
||||||
["<C-S-v>"] = { "edit_vsplit", mode = { "n", "i" } },
|
["<C-S-v>"] = { "edit_vsplit", mode = { "n", "i" } },
|
||||||
-- Ctrl+Shift+h - Open in horizontal split
|
|
||||||
["<C-S-h>"] = { "edit_split", mode = { "n", "i" } },
|
["<C-S-h>"] = { "edit_split", mode = { "n", "i" } },
|
||||||
-- Alternative mappings (in case terminal doesn't send Ctrl+Shift properly)
|
-- Plain Ctrl fallbacks for terminals that don't transmit
|
||||||
|
-- the Shift modifier seperately
|
||||||
["<C-v>"] = { "edit_vsplit", mode = { "n", "i" } },
|
["<C-v>"] = { "edit_vsplit", mode = { "n", "i" } },
|
||||||
["<C-x>"] = { "edit_split", mode = { "n", "i" } },
|
["<C-x>"] = { "edit_split", mode = { "n", "i" } },
|
||||||
},
|
},
|
||||||
@@ -59,100 +46,48 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
-- Ctrl+Shift+e - Toggle explorer
|
-- Optional Lazygit log/file-history shortcuts - LazyVim's <leader>gg
|
||||||
{ "<C-S-e>", function() Snacks.explorer() end, desc = "Toggle Explorer" },
|
-- already opens lazygit itself.
|
||||||
-- Alternative binding if terminal doesn't handle Ctrl+Shift
|
{
|
||||||
{ "<leader>fe", function() Snacks.explorer() end, desc = "File Explorer" },
|
"<leader>gl",
|
||||||
-- Lazygit
|
function()
|
||||||
{ "<leader>gg", function() Snacks.lazygit() end, desc = "Lazygit" },
|
Snacks.lazygit.log()
|
||||||
{ "<leader>gl", function() Snacks.lazygit.log() end, desc = "Lazygit Log" },
|
end,
|
||||||
{ "<leader>gf", function() Snacks.lazygit.log_file() end, desc = "Lazygit File History" },
|
desc = "Lazygit Log",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gf",
|
||||||
|
function()
|
||||||
|
Snacks.lazygit.log_file()
|
||||||
|
end,
|
||||||
|
desc = "Lazygit File History",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────
|
||||||
-- Which-key for keybinding hints
|
-- Which-key: leader-prefix cheat sheet
|
||||||
|
-- ─────────────────────────────────────────────────────────────────────────
|
||||||
|
-- Hold <leader> for ~300ms (timeoutlen) and the group menu appears.
|
||||||
{
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
spec = {
|
spec = {
|
||||||
{ "<leader>a", group = "AI" },
|
{ "<leader>a", group = "AI" },
|
||||||
{ "<leader>d", group = "Debug/Database" },
|
{ "<leader>b", group = "Buffer" },
|
||||||
|
{ "<leader>c", group = "Code" },
|
||||||
|
{ "<leader>cg", group = "Go" },
|
||||||
|
{ "<leader>cgp", group = "Profile" },
|
||||||
|
{ "<leader>cz", group = "Zig" },
|
||||||
|
{ "<leader>d", group = "Debug" },
|
||||||
|
{ "<leader>D", group = "Database" },
|
||||||
|
{ "<leader>f", group = "Find" },
|
||||||
{ "<leader>g", group = "Git" },
|
{ "<leader>g", group = "Git" },
|
||||||
{ "<leader>t", group = "Terminal" },
|
{ "<leader>o", group = "Overseer" },
|
||||||
},
|
{ "<leader>s", group = "Search / Symbols" },
|
||||||
},
|
{ "<leader>t", group = "Test" },
|
||||||
},
|
{ "<leader>T", group = "Terminal" },
|
||||||
|
{ "<leader>u", group = "UI / Toggle" },
|
||||||
-- Color preview for CSS, HTML, etc.
|
{ "<leader>x", group = "Diagnostics" },
|
||||||
{
|
|
||||||
"NvChad/nvim-colorizer.lua",
|
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
|
||||||
opts = {
|
|
||||||
filetypes = {
|
|
||||||
"css",
|
|
||||||
"scss",
|
|
||||||
"sass",
|
|
||||||
"less",
|
|
||||||
"html",
|
|
||||||
"javascript",
|
|
||||||
"typescript",
|
|
||||||
"javascriptreact",
|
|
||||||
"typescriptreact",
|
|
||||||
"vue",
|
|
||||||
"svelte",
|
|
||||||
"lua",
|
|
||||||
"yaml",
|
|
||||||
"toml",
|
|
||||||
"conf",
|
|
||||||
},
|
|
||||||
user_default_options = {
|
|
||||||
RGB = true,
|
|
||||||
RRGGBB = true,
|
|
||||||
RRGGBBAA = true,
|
|
||||||
names = true,
|
|
||||||
rgb_fn = true,
|
|
||||||
hsl_fn = true,
|
|
||||||
css = true,
|
|
||||||
css_fn = true,
|
|
||||||
mode = "background",
|
|
||||||
tailwind = false,
|
|
||||||
sass = { enable = true, parsers = { "css" } },
|
|
||||||
virtualtext = "■",
|
|
||||||
always_update = true, -- Update color values even if buffer is not focused
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Better terminal integration
|
|
||||||
{
|
|
||||||
"akinsho/toggleterm.nvim",
|
|
||||||
version = "*",
|
|
||||||
opts = {
|
|
||||||
size = function(term)
|
|
||||||
if term.direction == "horizontal" then
|
|
||||||
return 15
|
|
||||||
elseif term.direction == "vertical" then
|
|
||||||
return vim.o.columns * 0.4
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
open_mapping = [[<c-\>]],
|
|
||||||
hide_numbers = true,
|
|
||||||
shade_filetypes = {},
|
|
||||||
shade_terminals = true,
|
|
||||||
shading_factor = 2,
|
|
||||||
start_in_insert = true,
|
|
||||||
insert_mappings = true,
|
|
||||||
persist_size = true,
|
|
||||||
direction = "float",
|
|
||||||
close_on_exit = true,
|
|
||||||
shell = vim.o.shell,
|
|
||||||
float_opts = {
|
|
||||||
border = "curved",
|
|
||||||
winblend = 0,
|
|
||||||
highlights = {
|
|
||||||
border = "Normal",
|
|
||||||
background = "Normal",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,23 +1,22 @@
|
|||||||
-- Formatting configuration with conform.nvim
|
-- Formatting configuration with conform.nvim
|
||||||
-- Autoformat on save with per-filetype formatters
|
-- Autoformat on save with per-filetype formatters
|
||||||
|
--
|
||||||
|
-- LazyVim owns format-on-save: it registers conform via LazyVim.format.register()
|
||||||
|
-- and triggers a BufWritePre autocmd gated on vim.g.autoformat / vim.b.autoformat.
|
||||||
|
-- Do NOT set format_on_save here - it bypasses that pipeline.
|
||||||
|
--
|
||||||
|
-- Controls:
|
||||||
|
-- :LazyFormat format current buffer now
|
||||||
|
-- <leader>cf format buffer (LazyVim default)
|
||||||
|
-- <leader>uf toggle autoformat for this buffer
|
||||||
|
-- <leader>uF toggle autoformat globally
|
||||||
|
--
|
||||||
|
-- Per-filetype skip is done from autocmd.lua via `vim.b.autofmrat = false`.
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
event = { "BufWritePre" },
|
|
||||||
cmd = { "ConformInfo" },
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>cf",
|
|
||||||
function()
|
|
||||||
require("conform").format({ async = true, lsp_fallback = true })
|
|
||||||
end,
|
|
||||||
mode = { "n", "v" },
|
|
||||||
desc = "Format buffer",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = {
|
opts = {
|
||||||
-- Formatters by filetype
|
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
-- Go
|
-- Go
|
||||||
go = { "gofumpt", "goimports" },
|
go = { "gofumpt", "goimports" },
|
||||||
@@ -25,7 +24,7 @@ return {
|
|||||||
-- Lua
|
-- Lua
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
|
|
||||||
-- JavaScript/TypeScript
|
-- Javascript / Typescript
|
||||||
javascript = { "prettier" },
|
javascript = { "prettier" },
|
||||||
javascriptreact = { "prettier" },
|
javascriptreact = { "prettier" },
|
||||||
typescript = { "prettier" },
|
typescript = { "prettier" },
|
||||||
@@ -36,102 +35,37 @@ return {
|
|||||||
css = { "prettier" },
|
css = { "prettier" },
|
||||||
scss = { "prettier" },
|
scss = { "prettier" },
|
||||||
|
|
||||||
-- Data formats
|
-- Data
|
||||||
json = { "prettier" },
|
json = { "prettier" },
|
||||||
jsonc = { "prettier" },
|
jsonc = { "prettier" },
|
||||||
yaml = { "prettier" },
|
yaml = { "prettier" },
|
||||||
|
toml = { "prettier" },
|
||||||
|
|
||||||
-- Markdown
|
-- Markdown
|
||||||
markdown = { "prettier" },
|
markdown = { "prettier" },
|
||||||
["markdown.mdx"] = { "prettier" },
|
["markdown.mdx"] = { "prettier" },
|
||||||
|
|
||||||
-- SQL
|
-- SQL - manual format only, autoformat skipped in autocmds.lua
|
||||||
sql = { "sql_formatter", "sqlfluff", "pg_format" },
|
sql = { "sql_formatter" },
|
||||||
mysql = { "sql_formatter", "sqlfluff" },
|
mysql = { "sql_formatter" },
|
||||||
plsql = { "sql_formatter", "sqlfluff", "pg_format" },
|
plsql = { "sql_formatter" },
|
||||||
|
|
||||||
-- Makefile (no formatter - they require tabs)
|
|
||||||
-- make = {},
|
|
||||||
|
|
||||||
-- Fallback for all other filetypes
|
|
||||||
["_"] = { "trim_whitespace" },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Format on save
|
-- Per-formatter argument tweaks (merged with LazyVim defaults)
|
||||||
format_on_save = function(bufnr)
|
|
||||||
-- Disable for certain filetypes
|
|
||||||
local ignore_filetypes = { "sql", "mysql", "plsql" }
|
|
||||||
if vim.tbl_contains(ignore_filetypes, vim.bo[bufnr].filetype) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Disable with a global or buffer-local variable
|
|
||||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
timeout_ms = 3000,
|
|
||||||
lsp_fallback = true,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
|
|
||||||
-- Formatter options
|
|
||||||
formatters = {
|
formatters = {
|
||||||
-- Stylua configuration
|
|
||||||
stylua = {
|
stylua = {
|
||||||
prepend_args = { "--indent-type", "Spaces", "--indent-width", "2" },
|
prepend_args = { "--indent-type", "Spaces", "--indent-width", "2" },
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Prettier configuration
|
|
||||||
prettier = {
|
prettier = {
|
||||||
prepend_args = { "--tab-width", "2", "--single-quote" },
|
prepend_args = { "--tab-width", "2", "--single-quote" },
|
||||||
},
|
},
|
||||||
|
|
||||||
-- SQL formatter configuration
|
|
||||||
sql_formatter = {
|
sql_formatter = {
|
||||||
prepend_args = { "--language", "postgresql" },
|
prepend_args = { "--language", "postgresql" },
|
||||||
},
|
},
|
||||||
|
|
||||||
-- goimports configuration
|
|
||||||
goimports = {
|
goimports = {
|
||||||
prepend_args = { "-local", "github.com" },
|
prepend_args = { "-local", "github.com" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
init = function()
|
|
||||||
-- Commands to toggle format on save
|
|
||||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
|
||||||
if args.bang then
|
|
||||||
-- FormatDisable! will disable formatting just for this buffer
|
|
||||||
vim.b.disable_autoformat = true
|
|
||||||
else
|
|
||||||
vim.g.disable_autoformat = true
|
|
||||||
end
|
|
||||||
vim.notify("Autoformat disabled", vim.log.levels.INFO)
|
|
||||||
end, {
|
|
||||||
desc = "Disable autoformat-on-save",
|
|
||||||
bang = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("FormatEnable", function()
|
|
||||||
vim.b.disable_autoformat = false
|
|
||||||
vim.g.disable_autoformat = false
|
|
||||||
vim.notify("Autoformat enabled", vim.log.levels.INFO)
|
|
||||||
end, {
|
|
||||||
desc = "Re-enable autoformat-on-save",
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("FormatToggle", function()
|
|
||||||
vim.g.disable_autoformat = not vim.g.disable_autoformat
|
|
||||||
if vim.g.disable_autoformat then
|
|
||||||
vim.notify("Autoformat disabled", vim.log.levels.INFO)
|
|
||||||
else
|
|
||||||
vim.notify("Autoformat enabled", vim.log.levels.INFO)
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
desc = "Toggle autoformat-on-save",
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,19 @@
|
|||||||
|
-- nvim-coverage: show test coverage gutter signs.
|
||||||
|
-- Loads when opening Go files or when a Coverage* command is invoked.
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"andythigpen/nvim-coverage",
|
"andythigpen/nvim-coverage",
|
||||||
|
ft = "go",
|
||||||
|
cmd = {
|
||||||
|
"Coverage",
|
||||||
|
"CoverageLoad",
|
||||||
|
"CoverageShow",
|
||||||
|
"CoverageHide",
|
||||||
|
"CoverageToggle",
|
||||||
|
"CoverageClear",
|
||||||
|
"CoverageSummary",
|
||||||
|
},
|
||||||
dependencies = "nvim-lua/plenary.nvim",
|
dependencies = "nvim-lua/plenary.nvim",
|
||||||
config = true,
|
config = true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,231 +0,0 @@
|
|||||||
-- LSP Configuration
|
|
||||||
-- Extends LazyVim's built-in LSP support
|
|
||||||
|
|
||||||
-- Helper function for monorepo root detection
|
|
||||||
-- Finds nearest project marker, with fallback to git root
|
|
||||||
local function make_root_detector(markers)
|
|
||||||
return function(fname)
|
|
||||||
local util = require("lspconfig.util")
|
|
||||||
-- First try language-specific markers (nearest to file)
|
|
||||||
local root = util.root_pattern(unpack(markers))(fname)
|
|
||||||
if root then
|
|
||||||
return root
|
|
||||||
end
|
|
||||||
-- Fallback to git root
|
|
||||||
return util.root_pattern(".git")(fname)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
-- Mason: manage LSP servers, linters, formatters
|
|
||||||
{
|
|
||||||
"mason-org/mason.nvim",
|
|
||||||
opts = {
|
|
||||||
ensure_installed = {
|
|
||||||
-- LSP servers
|
|
||||||
"gopls", -- Go
|
|
||||||
"lua-language-server", -- Lua
|
|
||||||
"typescript-language-server", -- TypeScript/JavaScript
|
|
||||||
"js-debug-adapter", -- JS
|
|
||||||
"html-lsp", -- HTML
|
|
||||||
"css-lsp", -- CSS
|
|
||||||
"json-lsp", -- JSON
|
|
||||||
"yaml-language-server", -- YAML
|
|
||||||
"marksman", -- Markdown
|
|
||||||
"sqlls", -- SQL
|
|
||||||
-- Linters
|
|
||||||
"golangci-lint",
|
|
||||||
"eslint_d",
|
|
||||||
"markdownlint",
|
|
||||||
-- Formatters
|
|
||||||
"gofumpt",
|
|
||||||
"goimports",
|
|
||||||
"prettier",
|
|
||||||
"stylua",
|
|
||||||
"sql-formatter",
|
|
||||||
-- DAP
|
|
||||||
"delve", -- Go debugger
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- LSP configuration
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
opts = {
|
|
||||||
servers = {
|
|
||||||
-- Go
|
|
||||||
gopls = {
|
|
||||||
-- Root detection: find go.work first, then go.mod, then git root
|
|
||||||
root_dir = make_root_detector({ "go.work", "go.mod" }),
|
|
||||||
settings = {
|
|
||||||
gopls = {
|
|
||||||
gofumpt = true,
|
|
||||||
codelenses = {
|
|
||||||
gc_details = false,
|
|
||||||
generate = true,
|
|
||||||
regenerate_cgo = true,
|
|
||||||
run_govulncheck = true,
|
|
||||||
test = true,
|
|
||||||
tidy = true,
|
|
||||||
upgrade_dependency = true,
|
|
||||||
vendor = true,
|
|
||||||
},
|
|
||||||
hints = {
|
|
||||||
assignVariableTypes = true,
|
|
||||||
compositeLiteralFields = true,
|
|
||||||
compositeLiteralTypes = true,
|
|
||||||
constantValues = true,
|
|
||||||
functionTypeParameters = true,
|
|
||||||
parameterNames = true,
|
|
||||||
rangeVariableTypes = true,
|
|
||||||
},
|
|
||||||
analyses = {
|
|
||||||
fieldalignment = true,
|
|
||||||
nilness = true,
|
|
||||||
unusedparams = true,
|
|
||||||
unusedwrite = true,
|
|
||||||
useany = true,
|
|
||||||
},
|
|
||||||
usePlaceholders = true,
|
|
||||||
completeUnimported = true,
|
|
||||||
staticcheck = true,
|
|
||||||
directoryFilters = { "-.git", "-.vscode", "-.idea", "-.vscode-test", "-node_modules" },
|
|
||||||
semanticTokens = true,
|
|
||||||
-- Monorepo/workspace support
|
|
||||||
expandWorkspaceToModule = true,
|
|
||||||
experimentalPostfixCompletions = true,
|
|
||||||
-- Handle multiple modules
|
|
||||||
["build.standaloneTags"] = { "ignore" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Lua
|
|
||||||
lua_ls = {
|
|
||||||
root_dir = make_root_detector({ ".luarc.json", ".luarc.jsonc", ".luacheckrc", ".stylua.toml", "stylua.toml",
|
|
||||||
"selene.toml", "selene.yml" }),
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
workspace = {
|
|
||||||
checkThirdParty = false,
|
|
||||||
},
|
|
||||||
completion = {
|
|
||||||
callSnippet = "Replace",
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
globals = { "vim" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- TypeScript/JavaScript
|
|
||||||
ts_ls = {
|
|
||||||
-- Root detection: find nearest tsconfig/package.json
|
|
||||||
root_dir = make_root_detector({ "tsconfig.json", "jsconfig.json", "package.json" }),
|
|
||||||
settings = {
|
|
||||||
typescript = {
|
|
||||||
inlayHints = {
|
|
||||||
includeInlayParameterNameHints = "all",
|
|
||||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
|
||||||
includeInlayFunctionParameterTypeHints = true,
|
|
||||||
includeInlayVariableTypeHints = true,
|
|
||||||
includeInlayPropertyDeclarationTypeHints = true,
|
|
||||||
includeInlayFunctionLikeReturnTypeHints = true,
|
|
||||||
includeInlayEnumMemberValueHints = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
javascript = {
|
|
||||||
inlayHints = {
|
|
||||||
includeInlayParameterNameHints = "all",
|
|
||||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
|
||||||
includeInlayFunctionParameterTypeHints = true,
|
|
||||||
includeInlayVariableTypeHints = true,
|
|
||||||
includeInlayPropertyDeclarationTypeHints = true,
|
|
||||||
includeInlayFunctionLikeReturnTypeHints = true,
|
|
||||||
includeInlayEnumMemberValueHints = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- HTML
|
|
||||||
html = {
|
|
||||||
root_dir = make_root_detector({ "package.json", ".git" }),
|
|
||||||
filetypes = { "html", "templ" },
|
|
||||||
},
|
|
||||||
|
|
||||||
-- CSS
|
|
||||||
cssls = {
|
|
||||||
root_dir = make_root_detector({ "package.json", ".git" }),
|
|
||||||
},
|
|
||||||
|
|
||||||
-- JSON
|
|
||||||
jsonls = {
|
|
||||||
root_dir = make_root_detector({ "package.json", ".git" }),
|
|
||||||
},
|
|
||||||
|
|
||||||
-- YAML
|
|
||||||
yamlls = {
|
|
||||||
root_dir = make_root_detector({ "package.json", ".git" }),
|
|
||||||
settings = {
|
|
||||||
yaml = {
|
|
||||||
keyOrdering = false,
|
|
||||||
schemas = {
|
|
||||||
["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*",
|
|
||||||
["https://json.schemastore.org/docker-compose.json"] = "docker-compose*.yml",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Markdown
|
|
||||||
marksman = {
|
|
||||||
root_dir = make_root_detector({ ".marksman.toml", ".git" }),
|
|
||||||
},
|
|
||||||
|
|
||||||
-- SQL
|
|
||||||
sqlls = {
|
|
||||||
root_dir = make_root_detector({ ".sqllsrc.json", "sqlls.json", ".git" }),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Treesitter for better syntax highlighting
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
opts = {
|
|
||||||
ensure_installed = {
|
|
||||||
"go",
|
|
||||||
"gomod",
|
|
||||||
"gowork",
|
|
||||||
"gosum",
|
|
||||||
"lua",
|
|
||||||
"luadoc",
|
|
||||||
"typescript",
|
|
||||||
"javascript",
|
|
||||||
"tsx",
|
|
||||||
"html",
|
|
||||||
"css",
|
|
||||||
"json",
|
|
||||||
"jsonc",
|
|
||||||
"yaml",
|
|
||||||
"markdown",
|
|
||||||
"markdown_inline",
|
|
||||||
"sql",
|
|
||||||
"make",
|
|
||||||
"vim",
|
|
||||||
"vimdoc",
|
|
||||||
"bash",
|
|
||||||
"regex",
|
|
||||||
"diff",
|
|
||||||
"gitcommit",
|
|
||||||
"git_rebase",
|
|
||||||
},
|
|
||||||
highlight = { enable = true },
|
|
||||||
indent = { enable = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
182
lua/plugins/lspconfig.lua
Normal file
182
lua/plugins/lspconfig.lua
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
-- LSP server configurations
|
||||||
|
-- Extends LazyVim's nvim-lspconfig setup via opts.servers.
|
||||||
|
--
|
||||||
|
-- Uses `root_markers` (Neovim 0.11+ vim.lsp.config API) instead of a custom
|
||||||
|
-- root_dir function. root_markers is a list of filenames that, when found
|
||||||
|
-- walking upward from the buffer, identify the workspace root. `.git` is
|
||||||
|
-- always listed last as a fallback.
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = {
|
||||||
|
servers = {
|
||||||
|
-- -----------------------------------------------------------------
|
||||||
|
-- Go
|
||||||
|
-- -----------------------------------------------------------------
|
||||||
|
gopls = {
|
||||||
|
root_markers = { "go.work", "go.mod", ".git" },
|
||||||
|
settings = {
|
||||||
|
gopls = {
|
||||||
|
gofumpt = true,
|
||||||
|
codelenses = {
|
||||||
|
gc_details = false,
|
||||||
|
generate = true,
|
||||||
|
regenerate_cgo = true,
|
||||||
|
run_govulncheck = true,
|
||||||
|
test = true,
|
||||||
|
tidy = true,
|
||||||
|
upgrade_dependency = true,
|
||||||
|
vendor = true,
|
||||||
|
},
|
||||||
|
hints = {
|
||||||
|
assignVariableTypes = true,
|
||||||
|
compositeLiteralFields = true,
|
||||||
|
compositeLiteralTypes = true,
|
||||||
|
constantValues = true,
|
||||||
|
functionTypeParameters = true,
|
||||||
|
parameterNames = true,
|
||||||
|
rangeVariableTypes = true,
|
||||||
|
},
|
||||||
|
analyses = {
|
||||||
|
fieldalignment = true,
|
||||||
|
nilness = true,
|
||||||
|
unusedparams = true,
|
||||||
|
unusedwrite = true,
|
||||||
|
useany = true,
|
||||||
|
},
|
||||||
|
usePlaceholders = true,
|
||||||
|
completeUnimported = true,
|
||||||
|
staticcheck = true,
|
||||||
|
directoryFilters = { "-.git", "-.vscode", "-.idea", "-.vscode-test", "-node_modules" },
|
||||||
|
semanticTokens = true,
|
||||||
|
expandWorkspaceToModule = true,
|
||||||
|
experimentalPostfixCompletions = true,
|
||||||
|
["build.standaloneTags"] = { "ignore" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
cmd_env = {
|
||||||
|
GOEXPERIMENT = "jsonv2",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- -----------------------------------------------------------------
|
||||||
|
-- Zig
|
||||||
|
-- -----------------------------------------------------------------
|
||||||
|
zig = {
|
||||||
|
root_markers = { "build.zig", "build.zig.zon" },
|
||||||
|
settings = {
|
||||||
|
zls = {
|
||||||
|
enable_build_on_save = true,
|
||||||
|
-- "watch" or specify a step name your build.zig defines
|
||||||
|
build_on_save_step = "install",
|
||||||
|
semantic_tokens = "full",
|
||||||
|
enable_inlay_hints = true,
|
||||||
|
inlay_hints_show_parameter_name = true,
|
||||||
|
inlay_hints_show_builtin = true,
|
||||||
|
inlay_hints_show_variable_type_hints = true,
|
||||||
|
warn_style = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- -----------------------------------------------------------------
|
||||||
|
-- Lua
|
||||||
|
-- -----------------------------------------------------------------
|
||||||
|
lua_ls = {
|
||||||
|
root_markers = {
|
||||||
|
".luarc.json",
|
||||||
|
".luarc.jsonc",
|
||||||
|
".luacheckrc",
|
||||||
|
".stylua.toml",
|
||||||
|
"stylua.toml",
|
||||||
|
"selene.toml",
|
||||||
|
"selene.yml",
|
||||||
|
".git",
|
||||||
|
},
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
workspace = { checkThirdParty = false },
|
||||||
|
completion = { callSnippet = "Replace" },
|
||||||
|
diagnostics = { globals = { "vim" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- -----------------------------------------------------------------
|
||||||
|
-- TypeScript / JavaScript
|
||||||
|
-- -----------------------------------------------------------------
|
||||||
|
ts_ls = {
|
||||||
|
root_markers = { "tsconfig.json", "jsconfig.json", "package.json", ".git" },
|
||||||
|
settings = {
|
||||||
|
typescript = {
|
||||||
|
inlayHints = {
|
||||||
|
includeInlayParameterNameHints = "all",
|
||||||
|
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||||
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
|
includeInlayVariableTypeHints = true,
|
||||||
|
includeInlayPropertyDeclarationTypeHints = true,
|
||||||
|
includeInlayFunctionLikeReturnTypeHints = true,
|
||||||
|
includeInlayEnumMemberValueHints = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
javascript = {
|
||||||
|
inlayHints = {
|
||||||
|
includeInlayParameterNameHints = "all",
|
||||||
|
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||||
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
|
includeInlayVariableTypeHints = true,
|
||||||
|
includeInlayPropertyDeclarationTypeHints = true,
|
||||||
|
includeInlayFunctionLikeReturnTypeHints = true,
|
||||||
|
includeInlayEnumMemberValueHints = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- -----------------------------------------------------------------
|
||||||
|
-- Web (HTML / CSS / JSON / YAML)
|
||||||
|
-- -----------------------------------------------------------------
|
||||||
|
html = {
|
||||||
|
root_markers = { "package.json", ".git" },
|
||||||
|
filetypes = { "html", "templ" },
|
||||||
|
},
|
||||||
|
|
||||||
|
cssls = {
|
||||||
|
root_markers = { "package.json", ".git" },
|
||||||
|
},
|
||||||
|
|
||||||
|
jsonls = {
|
||||||
|
root_markers = { "package.json", ".git" },
|
||||||
|
},
|
||||||
|
|
||||||
|
yamlls = {
|
||||||
|
root_markers = { "package.json", ".git" },
|
||||||
|
settings = {
|
||||||
|
yaml = {
|
||||||
|
keyOrdering = false,
|
||||||
|
schemas = {
|
||||||
|
["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*",
|
||||||
|
["https://json.schemastore.org/docker-compose.json"] = "docker-compose*.yml",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- -----------------------------------------------------------------
|
||||||
|
-- Markdown / SQL / Docker
|
||||||
|
-- -----------------------------------------------------------------
|
||||||
|
marksman = {
|
||||||
|
root_markers = { ".marksman.toml", ".git" },
|
||||||
|
},
|
||||||
|
|
||||||
|
sqlls = {
|
||||||
|
root_markers = { ".sqllsrc.json", "sqlls.json", ".git" },
|
||||||
|
},
|
||||||
|
|
||||||
|
dockerls = {},
|
||||||
|
docker_compose_language_server = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
44
lua/plugins/mason.lua
Normal file
44
lua/plugins/mason.lua
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
return {
|
||||||
|
-- Mason: manage LSP servers, linters, formatters
|
||||||
|
{
|
||||||
|
"mason-org/mason.nvim",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
|
||||||
|
-- LSP servers
|
||||||
|
"gopls",
|
||||||
|
"lua-language-server",
|
||||||
|
"typescript-language-server",
|
||||||
|
"html-lsp",
|
||||||
|
"css-lsp",
|
||||||
|
"json-lsp",
|
||||||
|
"yaml-language-server",
|
||||||
|
"marksman",
|
||||||
|
"sqlls",
|
||||||
|
"pyright",
|
||||||
|
"ruff",
|
||||||
|
"docker-language-server",
|
||||||
|
"zls",
|
||||||
|
|
||||||
|
-- Linters
|
||||||
|
"golangci-lint",
|
||||||
|
"eslint_d",
|
||||||
|
"markdownlint",
|
||||||
|
"hadolint",
|
||||||
|
"shellcheck",
|
||||||
|
|
||||||
|
-- Formatters
|
||||||
|
"gofumpt",
|
||||||
|
"goimports",
|
||||||
|
"prettier",
|
||||||
|
"stylua",
|
||||||
|
"sql-formatter",
|
||||||
|
|
||||||
|
-- DAP adapters
|
||||||
|
"delve",
|
||||||
|
"js-debug-adapter",
|
||||||
|
"codelldb",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,17 +1,34 @@
|
|||||||
|
-- Neotest: test runner with Go and Python adapters.
|
||||||
|
-- Loads on go/python filetypes, or when require("neotest") is called from a
|
||||||
|
-- keymap (config.keymap wraps the bindings in `function() require(...) end`
|
||||||
|
-- precisely so the lazy-load can happen.
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-neotest/neotest",
|
"nvim-neotest/neotest",
|
||||||
|
lazy = true,
|
||||||
|
ft = { "go", "ptyhon", "zig" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-neotest/nvim-nio",
|
"nvim-neotest/nvim-nio",
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"antoinemadec/FixCursorHold.nvim",
|
"antoinemadec/FixCursorHold.nvim",
|
||||||
|
"nvim-treesitter/nvim-treesitter", -- noetest-zig parses tests via treesitter
|
||||||
|
|
||||||
-- Adapters
|
-- Adapters
|
||||||
"nvim-neotest/neotest-go",
|
"nvim-neotest/neotest-go",
|
||||||
"nvim-neotest/neotest-python",
|
"nvim-neotest/neotest-python",
|
||||||
|
"lawrence-laz/neotest-zig",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("neotest").setup({
|
require("neotest").setup({
|
||||||
|
log_level = vim.log.levels.WARN,
|
||||||
|
discovery = {
|
||||||
|
enabled = true,
|
||||||
|
concurrent = 0,
|
||||||
|
},
|
||||||
|
running = {
|
||||||
|
concurrent = true,
|
||||||
|
},
|
||||||
adapters = {
|
adapters = {
|
||||||
require("neotest-go")({
|
require("neotest-go")({
|
||||||
experimental = {
|
experimental = {
|
||||||
@@ -24,9 +41,16 @@ return {
|
|||||||
dap = { justMyCode = false },
|
dap = { justMyCode = false },
|
||||||
args = { "--disable-warnings", "-q" },
|
args = { "--disable-warnings", "-q" },
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
-- Zig: requires a standard `test` step in build.zig for project-wide runs;
|
||||||
|
-- individual .zig files also work.
|
||||||
|
-- dap.adapter must match the adapter named registered in dap.lua (codelldb) so <leader>dT-style
|
||||||
|
-- debug-test works from the summary too
|
||||||
|
require("neotest-zig")({
|
||||||
|
dap = { adapter = "codelldb" },
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,25 @@
|
|||||||
|
-- Overseer: task runner.
|
||||||
|
-- Loads on demand when any Overseer command is invoked.
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"stevearc/overseer.nvim",
|
"stevearc/overseer.nvim",
|
||||||
|
cmd = {
|
||||||
|
"OverseerOpen",
|
||||||
|
"OverseerClose",
|
||||||
|
"OverseerToggle",
|
||||||
|
"OverseerSaveBundle",
|
||||||
|
"OverseerLoadBundle",
|
||||||
|
"OverseerDeleteBundle",
|
||||||
|
"OverseerRunCmd",
|
||||||
|
"OverseerRun",
|
||||||
|
"OverseerInfo",
|
||||||
|
"OverseerBuild",
|
||||||
|
"OverseerQuickAction",
|
||||||
|
"OverseerTaskAction",
|
||||||
|
},
|
||||||
opts = {
|
opts = {
|
||||||
templates = { "builtin", "user" }
|
templates = { "builtin", "user" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
69
lua/plugins/treesitter.lua
Normal file
69
lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
-- Treesitter parsers
|
||||||
|
-- LazyVim's nvim-treesitter spec uses opts_extend = { "ensure_installed" }
|
||||||
|
-- so this list is merged with the parsers added by language extras.
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
-- Go
|
||||||
|
"go",
|
||||||
|
"gomod",
|
||||||
|
"gowork",
|
||||||
|
"gosum",
|
||||||
|
|
||||||
|
-- Lua
|
||||||
|
"lua",
|
||||||
|
"luadoc",
|
||||||
|
|
||||||
|
-- Typescript / Javascript
|
||||||
|
"typescript",
|
||||||
|
"javascript",
|
||||||
|
"tsx",
|
||||||
|
|
||||||
|
-- Web
|
||||||
|
"html",
|
||||||
|
"css",
|
||||||
|
|
||||||
|
-- Data
|
||||||
|
"json",
|
||||||
|
"jsonc",
|
||||||
|
"yaml",
|
||||||
|
"toml",
|
||||||
|
|
||||||
|
-- Markdown / docs
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
|
||||||
|
-- Zig
|
||||||
|
"zig",
|
||||||
|
|
||||||
|
-- Build / config
|
||||||
|
"ninja",
|
||||||
|
"sql",
|
||||||
|
"make",
|
||||||
|
|
||||||
|
-- Editor / shell
|
||||||
|
"vim",
|
||||||
|
"vimdoc",
|
||||||
|
"bash",
|
||||||
|
"regex",
|
||||||
|
|
||||||
|
-- Git
|
||||||
|
"diff",
|
||||||
|
"gitcommit",
|
||||||
|
"git_rebase",
|
||||||
|
|
||||||
|
-- Containers
|
||||||
|
"dockerfile",
|
||||||
|
|
||||||
|
-- Typesetting
|
||||||
|
"latex",
|
||||||
|
"typst",
|
||||||
|
},
|
||||||
|
highlight = { enable = true },
|
||||||
|
indent = { enable = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
19
lua/plugins/zig.lua
Normal file
19
lua/plugins/zig.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
-- Zig language support via the official Codeberg-hosted plugin.
|
||||||
|
-- Loads only on zig files.
|
||||||
|
--
|
||||||
|
-- The rest of the Zig toolchain is wired in alongside the other languages so
|
||||||
|
-- it benefits from the same lazy-loading and config:
|
||||||
|
-- * LSP (zls) ........... lspconfig.lua (servers.zls) + mason.lua
|
||||||
|
-- * Treesitter parser ... treesitter.lua ("zig")
|
||||||
|
-- * Tests in-buffer ..... neotest.lua (neotest-zig adapter, ft=zig)
|
||||||
|
-- * Debug (codelldb) .... dap.lua (dap.configurations.zig) + mason
|
||||||
|
-- * Run/build tasks ..... overseer/template/user/zig_{build,run,test}.lua
|
||||||
|
-- * Quick keymaps ....... keymaps.lua (<leader>cz*) + which-key group
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"https://codeberg.org/ziglang/zig.vim",
|
||||||
|
lazy = true,
|
||||||
|
ft = { "zig" },
|
||||||
|
},
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user