Skip to content

Commit 372fa85

Browse files
committed
Improved README
1 parent eb46765 commit 372fa85

1 file changed

Lines changed: 83 additions & 1 deletion

File tree

README.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@ The [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) pickers t
55
The plugin analyzes the entire class/module hierarchy, including parent classes, traits, interfaces, and other inherited elements, giving you a complete view of the API surface.
66
![demo.gif](https://github.com/user-attachments/assets/e9ddda56-912d-4475-b7d6-94c573939db6)
77

8+
## Features
9+
10+
- **Complete API view**: Display all class/module members including inherited elements
11+
- **Visibility indicators**: Shows access modifiers (public, private, protected) for each member
12+
- **Hierarchical analysis**: Understands inheritance from parent classes, traits, and interfaces
13+
- **Fast navigation**: Quickly jump to any symbol definition
14+
- **Integration with LSP**: Works alongside your language server for accurate symbol information
15+
- **Telescope integration**: Familiar fuzzy-finding interface for efficient filtering
16+
17+
## Supported Languages
18+
19+
- PHP
20+
- Java
21+
- More languages coming soon! (Contributions welcome)
22+
23+
## Requirements
24+
25+
- [Neovim](https://neovim.io/) (0.7.0+)
26+
- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim)
27+
- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter)
28+
- [plenary.nvim](https://github.com/nvim-lua/plenary.nvim)
29+
830
## Installation
931
Using [lazy.nvim](https://github.com/folke/lazy.nvim)
1032
```lua
@@ -28,13 +50,18 @@ Using [lazy.nvim](https://github.com/folke/lazy.nvim)
2850
-- Configurations for the clapi picker
2951
require('telescope').setup {
3052
extensions = {
31-
clapi = {},
53+
clapi = {
54+
-- Additional options can be configured here
55+
-- show_inherited = true, -- Set to false to only show members defined in the current class
56+
-- default_visibility = "public", -- Filter by default visibility (public, protected, private)
57+
},
3258
},
3359
}
3460
end,
3561
}
3662
```
3763
Full example in my nvim config repository: [nvim](https://github.com/MarkelCA/nvim/blob/master/lua/plugins/clapi.lua)
64+
3865
## Usage
3966

4067
After installation, you can use the picker with:
@@ -48,3 +75,58 @@ Or in Lua:
4875
```lua
4976
:lua require('clapi').builtin()
5077
```
78+
79+
You can also pass options to filter the results:
80+
81+
```lua
82+
:lua require('clapi').builtin({show_inherited = false})
83+
```
84+
85+
## Configuration Options
86+
87+
The following options can be configured in the telescope setup:
88+
89+
```lua
90+
require('telescope').setup {
91+
extensions = {
92+
clapi = {
93+
-- Show inherited members (default: true)
94+
show_inherited = true,
95+
96+
-- Default visibility filter (default: nil - show all)
97+
-- Can be "public", "protected", "private", or nil
98+
default_visibility = nil,
99+
100+
-- Additional display customization options
101+
display = {
102+
show_filename = true, -- Show filename in results
103+
show_line_numbers = true, -- Show line numbers
104+
},
105+
},
106+
},
107+
}
108+
```
109+
110+
## Troubleshooting
111+
112+
**Q: No symbols are displayed for my file**
113+
A: Make sure you have the appropriate language parser installed for treesitter:
114+
```vim
115+
:TSInstall php
116+
:TSInstall java
117+
```
118+
119+
**Q: Some inherited members are missing**
120+
A: The plugin requires proper parsing of the inheritance hierarchy. Ensure your project structure allows the plugin to find parent classes and interfaces.
121+
122+
## Contributing
123+
124+
Contributions are welcome! Please feel free to submit a Pull Request.
125+
126+
1. Fork the repository
127+
2. Create your feature branch
128+
3. Commit your changes
129+
4. Push to the branch
130+
5. Submit a pull request
131+
132+
For adding support for a new language, check the `lua/clapi/parser/` directory for examples.

0 commit comments

Comments
 (0)