Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #53

Merged
merged 3 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@
<li><a href="#installation">Installation</a></li>
<li><a href="#getting-started">Getting started</a></li>
<li><a href="#configuration">Configuration</a></li>
<li><a href="#Wiki">Wiki</a></li>
<li><a href="#Documentation">Documentation</a></li>
<li><a href="#contributing">Contributing</a></li>
<li><a href="#license">License</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#motivations">Motivations</a></li>
<li><a href="#Credits">Credits</a></li>
</ol>
<!-- </details> -->

Expand Down Expand Up @@ -259,9 +258,9 @@ require("wf").setup({

<p align="right">(<a href="#readme-top">back to top</a>)</p>

## Document
## Documentation

You can find guides the plugin on [the docs](/~https://github.com/Cassin01/wf.nvim/blob/main/doc/wf.txt)
You can find guides for the plugin on [document](/~https://github.com/Cassin01/wf.nvim/blob/main/doc/wf.txt)

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Expand Down Expand Up @@ -301,7 +300,6 @@ end

-- set keymap for each plugins
---------------------------------------

-- lambdalisue/fern.vim
nmaps("<space>n", "fern",
{{"p", "<cmd>Fern . -drawer -toggle<cr>", "open fern on a current working directory"},
Expand All @@ -320,9 +318,8 @@ nmaps("<space>t", "telescope"

-- set keymap for calling which-key
---------------------------------------

vim.set.keymap("n", "<Space>, which_key({text_insert_in_advance="<space>",
key_group_dict=_G.__key_prefixes["n"]}),
vim.set.keymap("n", "<Space>",
which_key({text_insert_in_advance="<space>", key_group_dict=_G.__key_prefixes["n"]}),
{noremap = true, silent = tre, desc = "which-key space", nowait = true})
```

Expand All @@ -332,16 +329,17 @@ key_group_dict=_G.__key_prefixes["n"]}),
<!-- CONTRIBUTING -->
## Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
3. Generate document, format codes and test codes (`make push`)
4. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
5. Push to the Branch (`git push origin feature/AmazingFeature`)
6. Open a Pull Request

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Expand Down
11 changes: 7 additions & 4 deletions lua/wf/builtin/buffer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,22 @@ local function buffer(opts)
return { { " ", "Identifier" }, { desc, "WFWhichDesc" } }
end
local hldesc = bufinfo.changed == 1 and "String" or "WFWhichDesc"
local function fnamemodify(fname)
return vim.fn.fnamemodify(fname, ":.")
end
if id == current_buf then
return { { " ", "Identifier" }, { desc, hldesc } }
return { { " ", "Identifier" }, { fnamemodify(desc), hldesc } }
end
if ok then
local icon, color = devicon.get_icon_color(desc)
if icon ~= nil then
local sp = vim.fn.strwidth(icon) > 1 and (icon .. "") or (icon .. " ")
return { { sp .. " ", gen_highlight(desc, color) }, { desc, hldesc } }
return { { sp .. " ", gen_highlight(desc, color) }, { fnamemodify(desc), hldesc } }
else
return { { " ", "Identifier" }, { desc, hldesc } }
return { { " ", "Identifier" }, { fnamemodify(desc), hldesc } }
end
else
return { { desc, hldesc } }
return { { fnamemodify(desc), hldesc } }
end
end,
}
Expand Down