Skip to content

Commit d12e086

Browse files
feat: Enhance Neovim configuration with detailed editor options, improved keymaps, and theme setup
1 parent ffff18f commit d12e086

File tree

5 files changed

+299
-85
lines changed

5 files changed

+299
-85
lines changed

.config/nvim/README.md

Lines changed: 111 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,141 @@ This folder contains all Neovim configuration files, written in Lua for a modern
1111
- `lua/lsp.lua`: Language Server Protocol (LSP) configuration for code intelligence.
1212
- `lazy-lock.json`: Plugin lockfile.
1313

14+
## Editor Options
15+
16+
- Line numbers enabled
17+
- Mouse support in all modes (`mouse='a'`)
18+
- Case-sensitive search (`ignorecase=false`, `smartcase=false`)
19+
- No search highlighting (`hlsearch=false`)
20+
- Soft wrapping with indent preservation (`wrap=true`, `breakindent=true`)
21+
- Tab settings: 2 spaces (`tabstop=2`, `shiftwidth=2`, `expandtab=true`)
22+
- True color terminal support (`termguicolors=true`)
23+
- Improved completion menu (`completeopt={'menu', 'menuone', 'noselect'}`)
24+
- Local leader set to comma (`,`)
25+
1426
## Keymaps & Shortcuts
1527

1628
- `<leader>` is set to the spacebar.
1729
- Common keymaps:
1830
- `<leader>w` — Save file
1931
- `<leader>ee` — Toggle file explorer
32+
- `<leader>ef` — Toggle file explorer focused on current file
2033
- `<leader>lg` — Open LazyGit
2134
- `<leader>/` — Toggle comment (normal/visual mode)
35+
- `<leader>?` — Show buffer-local keymaps (which-key)
2236
- Clipboard:
23-
- `<leader>y`/`<leader>Y` — Copy to system clipboard
24-
- `<leader>p`/`<leader>P` — Paste from system clipboard
37+
- `<leader>y` — Copy to system clipboard
38+
- `<leader>Y` — Copy to system clipboard (alternative)
39+
- `<leader>p` — Paste from system clipboard
40+
- `<leader>P` — Paste from system clipboard (alternative)
2541
- Telescope:
2642
- `<leader>ff` — Find files
43+
- `<leader>fg` — Live grep (search file content)
44+
- `<leader>fb` — List buffers
2745
- `<leader>fh` — Find help tags
46+
- Terminal:
47+
- `<Ctrl-\>` — Toggle floating terminal
48+
49+
### LSP Keymaps
50+
51+
- Diagnostics:
52+
- `<space>e` — Show diagnostics in a floating window
53+
- `[d` — Go to previous diagnostic
54+
- `]d` — Go to next diagnostic
55+
- `<space>q` — Show diagnostics in location list
56+
- Code Navigation:
57+
- `gD` — Go to declaration
58+
- `gd` — Go to definition
59+
- `K` — Show hover information
60+
- `gi` — Go to implementation
61+
- `<C-k>` — Show signature help
62+
- `gr` — Show references
63+
- Workspace Management:
64+
- `<space>wa` — Add workspace folder
65+
- `<space>wr` — Remove workspace folder
66+
- `<space>wl` — List workspace folders
67+
- Refactoring:
68+
- `<space>D` — Go to type definition
69+
- `<space>rn` — Rename symbol
70+
- `<space>ca` — Code action
71+
- `<space>f` — Format code
2872

2973
## Plugins
3074

3175
- Managed with [lazy.nvim](https://github.com/folke/lazy.nvim)
32-
- Notable plugins:
33-
- `nvim-tree` (file explorer)
34-
- `telescope.nvim` (fuzzy finder)
35-
- `mason.nvim` & `mason-lspconfig.nvim` (LSP installer)
36-
- `nvim-lspconfig` (LSP setup)
37-
- `Comment.nvim` (comment toggling)
38-
- `github/copilot.vim` (AI code suggestions)
76+
- Core Functionality:
77+
- `nvim-tree` — File explorer with icons
78+
- `telescope.nvim` — Fuzzy finder for files, buffers, and more
79+
- `mason.nvim` & `mason-lspconfig.nvim` — LSP installer and configuration
80+
- `nvim-lspconfig` — Language server setup for code intelligence
81+
- `Comment.nvim` — Easy comment toggling with `<leader>/`
82+
- `github/copilot.vim` — AI code suggestions
83+
- `toggleterm.nvim` — Better terminal integration
84+
- `lazygit.nvim` — Git integration with LazyGit
85+
- `lualine.nvim` — Enhanced status line
86+
- `which-key.nvim` — Interactive keymap guide that shows available key bindings
87+
88+
### Code Highlighting & Enhancement
89+
90+
- `nvim-treesitter` — Advanced syntax highlighting using Tree-sitter
91+
- `nvim-treesitter-context` — Shows code context (function/class names) at the top
92+
- `log-highlight.nvim` — Specialized highlighting for log files
93+
- `nvim-colorizer.lua` — Inline color previews for hex/RGB values
94+
- `document-color.nvim` — LSP-based color highlighting for CSS/Tailwind
95+
- `nvim-treesitter-refactor` — Additional Tree-sitter features for refactoring
96+
- `vim-moonfly-colors` — Color scheme
97+
98+
### Completion & Snippets
99+
100+
- `blink.cmp` — Fast and customizable completion engine
101+
- Configuration includes LSP, path, snippet, and buffer sources
102+
- Uses 'mono' nerd font variant
103+
104+
### Discord Integration
105+
106+
- `presence.nvim` — Discord rich presence integration
107+
- Shows editing status, workspace, and file information
108+
- Customized text for different activities
39109

40110
## LSP
41111

42-
- Preconfigured for Python (`pylsp`), Lua (`lua_ls`), and Rust (`rust_analyzer`).
43-
- Custom `on_attach` for LSP keymaps and diagnostics.
112+
- Managed with Mason and mason-lspconfig for easy installation
113+
- Preconfigured LSP servers:
114+
- `pylsp` — Python Language Server
115+
- `lua_ls` — Lua Language Server
116+
- `rust_analyzer` — Rust Language Server with clippy integration
117+
- Custom `on_attach` function for consistent keymaps across language servers
118+
- Enhanced diagnostics configuration with convenient navigation
119+
- Supports core LSP features:
120+
- Code completion
121+
- Go to definition/declaration
122+
- Find references
123+
- Code actions and refactoring
124+
- Hover documentation
125+
- Signature help
126+
- Workspace symbol management
127+
- Code formatting
44128

45129
## Usage
46130

47131
- Launch with `nvim`.
48132
- All settings and keymaps are modular and easy to extend.
133+
- Use `:Mason` to install additional language servers.
134+
- Use `:Lazy` to manage plugins.
135+
136+
## Tree-sitter Benefits
137+
138+
Tree-sitter provides superior syntax highlighting by using a concrete syntax tree (CST) for each file. This delivers several advantages over traditional regex-based highlighting:
139+
140+
- **More accurate highlighting** — No more edge case issues with regex highlighting
141+
- **Consistent across languages** — Common elements look the same across different languages
142+
- **Performance improvements** — More efficient and handles large files better
143+
- **Structural understanding** — Tree-sitter understands code structure, not just patterns
144+
- **Advanced features** — Enables features like refactoring, code folding, and text objects
145+
146+
The configured Tree-sitter setup includes auto-installation of language parsers for:
147+
C, Lua, Vim, VimDoc, Query, JavaScript, TypeScript, Python, HTML, CSS, JSON, YAML, Bash, Markdown
49148

50149
---
51150

52-
**Tip:** See `lua/keymaps.lua` for all custom shortcuts. Tweak or add your own for maximum productivity!
151+
**Tip:** Run `:Lazy update` periodically to keep your plugins up to date.

.config/nvim/init.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require('options')
22
require('keymaps')
3-
require('plugins')
3+
require('plugins') -- Load plugins first so the colorscheme is available
4+
require('theme').setup() -- Now call theme setup with colorscheme and brightness adjustments
45
require('lsp')

.config/nvim/lazy-lock.json

Lines changed: 25 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,27 @@
11
{
2-
"Comment.nvim": {
3-
"branch": "master",
4-
"commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb"
5-
},
6-
"blink.cmp": {
7-
"branch": "main",
8-
"commit": "4f38ce99a472932d5776337f08f7a8180f1f571a"
9-
},
10-
"copilot.vim": {
11-
"branch": "release",
12-
"commit": "18f485d892b56b311fd752039d6977333ebc2a0f"
13-
},
14-
"friendly-snippets": {
15-
"branch": "main",
16-
"commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175"
17-
},
18-
"lazy.nvim": {
19-
"branch": "main",
20-
"commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a"
21-
},
22-
"lazygit.nvim": {
23-
"branch": "main",
24-
"commit": "b9eae3badab982e71abab96d3ee1d258f0c07961"
25-
},
26-
"lualine.nvim": {
27-
"branch": "master",
28-
"commit": "15884cee63a8c205334ab13ab1c891cd4d27101a"
29-
},
30-
"mason-lspconfig.nvim": {
31-
"branch": "main",
32-
"commit": "d39a75bbce4b8aad5d627191ea915179c77c100f"
33-
},
34-
"mason.nvim": {
35-
"branch": "main",
36-
"commit": "7c7318e8bae7e3536ef6b9e86b9e38e74f2e125e"
37-
},
38-
"nvim-lspconfig": {
39-
"branch": "master",
40-
"commit": "61e5109c8cf24807e4ae29813a3a82b31821dd45"
41-
},
42-
"nvim-tree.lua": {
43-
"branch": "master",
44-
"commit": "be5b788f2dc1522c73fb7afad9092331c8aebe80"
45-
},
46-
"nvim-treesitter": {
47-
"branch": "master",
48-
"commit": "28d480e0624b259095e56f353ec911f9f2a0f404"
49-
},
50-
"nvim-web-devicons": {
51-
"branch": "master",
52-
"commit": "f1420728f59843eb2ef084406b3d0201a0a0932d"
53-
},
54-
"plenary.nvim": {
55-
"branch": "master",
56-
"commit": "857c5ac632080dba10aae49dba902ce3abf91b35"
57-
},
58-
"presence.nvim": {
59-
"branch": "main",
60-
"commit": "87c857a56b7703f976d3a5ef15967d80508df6e6"
61-
},
62-
"telescope.nvim": {
63-
"branch": "master",
64-
"commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7"
65-
},
66-
"vim-moonfly-colors": {
67-
"branch": "master",
68-
"commit": "164888b0140d6a4ba3f5ec5d760d46fb6a417d7a"
69-
}
2+
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
3+
"blink.cmp": { "branch": "main", "commit": "4f38ce99a472932d5776337f08f7a8180f1f571a" },
4+
"copilot.vim": { "branch": "release", "commit": "18f485d892b56b311fd752039d6977333ebc2a0f" },
5+
"document-color.nvim": { "branch": "main", "commit": "74c487f0e5accfaae033755451b9e367220693fd" },
6+
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
7+
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
8+
"lazygit.nvim": { "branch": "main", "commit": "b9eae3badab982e71abab96d3ee1d258f0c07961" },
9+
"log-highlight.nvim": { "branch": "main", "commit": "ad14bf52ef93d83a625ab22a1ed94405bcacbcf7" },
10+
"lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" },
11+
"mason-lspconfig.nvim": { "branch": "main", "commit": "d39a75bbce4b8aad5d627191ea915179c77c100f" },
12+
"mason.nvim": { "branch": "main", "commit": "7c7318e8bae7e3536ef6b9e86b9e38e74f2e125e" },
13+
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
14+
"nvim-lspconfig": { "branch": "master", "commit": "61e5109c8cf24807e4ae29813a3a82b31821dd45" },
15+
"nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" },
16+
"nvim-tree.lua": { "branch": "master", "commit": "be5b788f2dc1522c73fb7afad9092331c8aebe80" },
17+
"nvim-treesitter": { "branch": "master", "commit": "28d480e0624b259095e56f353ec911f9f2a0f404" },
18+
"nvim-treesitter-context": { "branch": "master", "commit": "5c48b8ba1b0b7b25feb6e34e7eb293ea893aedc4" },
19+
"nvim-treesitter-refactor": { "branch": "master", "commit": "d8b74fa87afc6a1e97b18da23e762efb032dc270" },
20+
"nvim-web-devicons": { "branch": "master", "commit": "f1420728f59843eb2ef084406b3d0201a0a0932d" },
21+
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
22+
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
23+
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
24+
"toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" },
25+
"vim-moonfly-colors": { "branch": "master", "commit": "164888b0140d6a4ba3f5ec5d760d46fb6a417d7a" },
26+
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
7027
}

0 commit comments

Comments
 (0)