Comments (5)
As a matter of fact, I just have a fuzzy idea about your proposal and don't exactly know what should be done. It could be better if you can elaborate on this. I'm not a specialist on ctags.
from vista.vim.
The feature I miss most is displaying type signatures.
Currently the parser errors if given extended ctags
ctags:
Lib src/Lib.hs 1
someFunc src/Lib.hs 5
ctags extended:
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_NAME hasktags
Lib src/Lib.hs /^module Lib$/;" m line:1 language:Haskell
someFunc src/Lib.hs /^someFunc :: IO ()$/;" ft signature:(IO ()) line:5 language:Haskell
universal-ctags output for rust:
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 0.0.0 /4ab59765/
Change src/lib.rs /^pub enum Change<T> {$/;" g
Changes src/lib.rs /^impl<T> From<Vec<Change<T>>> for Changes<T> {$/;" c
Changes src/lib.rs /^impl<T> Into<Vec<Change<T>>> for Changes<T> {$/;" c
Changes src/lib.rs /^struct Changes<T> {$/;" s
ChangesBuilder src/lib.rs /^impl<'l> diffs::Diff for ChangesBuilder<'l, &'l str> {$/;" c
ChangesBuilder src/lib.rs /^struct ChangesBuilder<'l, T>(HashedLines<'l>, Changes<Vec<T>>);$/;" s
Delete src/lib.rs /^ Delete {$/;" e enum:Change
EitherOrBoth src/lib.rs /^impl<L, R> FromEOB<L, R> for EitherOrBoth<L, R> {$/;" c
Equal src/lib.rs /^ Equal {$/;" e enum:Change
Error src/lib.rs /^ type Error = ();$/;" t implementation:ChangesBuilder
FromEOB src/lib.rs /^trait FromEOB<L, R> {$/;" i
HashDiff src/lib.rs /^trait HashDiff<T, I, D> {$/;" i
HashedLines src/lib.rs /^struct HashedLines<'l> {$/;" s
IndexMapping src/lib.rs /^type IndexMapping<'l> = PerfectHasher32<&'l str, Murmur3Hasher_x86_32>;$/;" t
Insert src/lib.rs /^ Insert {$/;" e enum:Change
LineDiff src/lib.rs /^trait LineDiff<'l> {$/;" i
Replace src/lib.rs /^ Replace {$/;" e enum:Change
changed_new src/lib.rs /^ changed_new: Vec<Id<u32>>,$/;" m struct:HashedLines
changed_old src/lib.rs /^ changed_old: Vec<Id<u32>>,$/;" m struct:HashedLines
delete src/lib.rs /^ fn delete(&mut self, old_index: usize, len: usize) -> Result<(), ()> {$/;" P implementation:ChangesBuilder
diff src/lib.rs /^ diff: Vec<Change<T>>,$/;" m struct:Changes
equal src/lib.rs /^ fn equal(&mut self, old_index: usize, new_index: usize, len: usize) -> Result<(), ()> {$/;" P implementation:ChangesBuilder
from src/lib.rs /^ fn from(diff: Vec<Change<T>>) -> Changes<T> {$/;" P implementation:Changes
hash_diff_vec src/lib.rs /^ fn hash_diff_vec(self, new: I) -> Vec<D>;$/;" P interface:HashDiff
index_map src/lib.rs /^ index_map: IndexMapping<'l>,$/;" m struct:HashedLines
insert src/lib.rs /^ fn insert(&mut self, old_index: usize, new_index: usize, new_len: usize) -> Result<(), ()> {$/;" P implementation:ChangesBuilder
into src/lib.rs /^ fn into(self) -> Vec<Change<T>> {$/;" P implementation:Changes
into_either src/lib.rs /^ fn into_either(self) -> Option<Either<L, R>> {$/;" P implementation:EitherOrBoth
into_either src/lib.rs /^ fn into_either(self) -> Option<Either<L, R>>;$/;" P interface:FromEOB
lines_hash_diff src/lib.rs /^ fn lines_hash_diff(self, new: &'l str) -> Option<HashedLines> {$/;" P implementation:str
lines_hash_diff src/lib.rs /^ fn lines_hash_diff(self, new: &'l str) -> Option<HashedLines>;$/;" P interface:LineDiff
replace src/lib.rs /^ fn replace($/;" P implementation:ChangesBuilder
str src/lib.rs /^impl<'l> LineDiff<'l> for &'l str {$/;" c
from vista.vim.
This will need some work, I didn't take this into account before.
from vista.vim.
I pushed a new branch https://github.com/liuchengxu/vista.vim/tree/refine-ctags-kinds which supports the various kinds and I experimentally added the signature
kind. Ensure your ctags supports json output format, you could try it with some rust file.
My concern is how to work with these kinds properly. As you can see, the signature for function/method is probably very long. You need a broad sidebar to see them all.
It's nice to support language specific kinds for ctags, which is also good for other features, but I haven't figured out how to integrate them decently at present. How do you like?
One more thing, regarding the signature, I think most info provided by the kinds could be obtained from the echoed source line.
from vista.vim.
This PR #35 has added the support for the extended ctags. You can see if that fixes this issue.
from vista.vim.
Related Issues (20)
- E121: undefined variable: g:vista_default_executive in MacVim
- Vista does not work on MacVim HOT 1
- Could the sidebar rendering being improved when using ALE?
- Support for YouCompleteMe? HOT 2
- let g:vista_default_executive = 'nvim_lsp' can not save file
- BUG: ruby nest module not show in ctags viewer
- Auto-open Vista window when starting with vim_lsp HOT 1
- A different layout for the Vista window HOT 1
- Statusline gets cleared when changing buffers even when `let g:vista_disable_statusline = 1` is set
- Add additional info like signatures to functions like in tagbar HOT 1
- Does not support Nerd Font v3+
- Automatic folding (zMzv like) when not in focus
- Unsupported kind: 'w' for --go-kinds option HOT 4
- Tree view for ctags HOT 1
- lsp+fzf preview show incorrect line. HOT 1
- I can't use it after installing
- Tex: [vista.vim] ctags: Warning: Unsupported kind: 'f' for --tex-kinds option HOT 1
- Plug-in doesn't get the job done because: "ctags: Warning: Cannot disable fixed field 'xxx' {pattern}" HOT 16
- Any plan for https://github.com/yegappan/lsp HOT 1
- Share same statusline of sidebar and other buffer HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vista.vim.