Compare commits
59 commits
Author | SHA1 | Date | |
---|---|---|---|
caeeb528b3 | |||
|
6fd3d328a5 | ||
5e4b8d8b9b | |||
267a6f1929 | |||
8eaf4288da | |||
2dc17c2851 | |||
ebe528abfa | |||
9706834ddb | |||
cb397b7f92 | |||
936f405764 | |||
458af12abf | |||
7f352b9733 | |||
c02b4ee543 | |||
96ff1d7933 | |||
8113956657 | |||
de11ec20e1 | |||
fb861daa38 | |||
730d24f51d | |||
8de63b5f59 | |||
1d70d57a24 | |||
b013ab780c | |||
a8b3645148 | |||
84bf31cb41 | |||
2dcc50a1f0 | |||
dabb2f969e | |||
39e5545442 | |||
0a67458d17 | |||
71445b6768 | |||
04858218cd | |||
ab227484e7 | |||
6ebc8353a6 | |||
8d6d4c1894 | |||
74f9b467fa | |||
442a587137 | |||
0a5bba771f | |||
221bb66d75 | |||
62aa4d949c | |||
265e0a0ece | |||
7119e95235 | |||
c21956e5d1 | |||
53d1db8abc | |||
7235e49032 | |||
5cb8ed43b4 | |||
2f8194437a | |||
c2b4401da1 | |||
b8906d8557 | |||
93e108e048 | |||
d02d27a412 | |||
278db3321a | |||
96a873f0a0 | |||
ad4722b3c9 | |||
7a5774a71c | |||
138b46f8a0 | |||
d9d4d1169b | |||
3c26384e30 | |||
b0f1dd9656 | |||
e6d978fc38 | |||
644dab6ed3 | |||
96bce82d7b |
8 changed files with 773 additions and 487 deletions
111
.gitea/ISSUE_TEMPLATE/bug_report.yml
Normal file
111
.gitea/ISSUE_TEMPLATE/bug_report.yml
Normal file
|
@ -0,0 +1,111 @@
|
|||
name: Issue report
|
||||
description: Report any errors, bugs, or unexpected behaviors related to presence.nvim
|
||||
title: "[Bug]: "
|
||||
labels: [bug]
|
||||
assignees:
|
||||
- jiriks74
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before reporting, please search [existing issues](https://gitea.stefka.eu/jiriks74/astronvim_config/issues/) and make sure that you are on the latest commit
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: "Are you on the latest version of the commit?"
|
||||
description: "If no, please backup your current config and update."
|
||||
options:
|
||||
- "Yes"
|
||||
- "No"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: "Which commit are you on?"
|
||||
description: "To thet the commit hash run `git rev-parse --short HEAD` in the config directory (`~/.config/nvim/lua/user`)"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: "Have you modified the config?"
|
||||
description: "If so, backup your current config and try the default one before reporting."
|
||||
options:
|
||||
- "Yes"
|
||||
- "No"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Description"
|
||||
description: "A short summary of the error, bug, or unexpected behavior you're facing."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Neovim version"
|
||||
description: "Output of `nvim --version`"
|
||||
render: markdown
|
||||
placeholder: |
|
||||
NVIM: v0.6.0-dev+209-g0603eba6e
|
||||
Build type: Release
|
||||
LuaJIT: 2.1.0-beta3
|
||||
value: |
|
||||
NVIM:
|
||||
Build type:
|
||||
LuaJIT:
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: "OS information"
|
||||
placeholder: "Ubuntu 22.04"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Steps to reproduce"
|
||||
description: "Steps to reproduce the issue with your config(s) if applicable."
|
||||
placeholder: |
|
||||
1. Setup presence.nvim with `require("presence"):setup({...})`
|
||||
2. Run Neovim with `nvim test.txt`
|
||||
3. ...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Logs"
|
||||
description: "The full list of `:messages` from one or more `nvim` instances.\nPlease insert the logs into code blocks."
|
||||
placeholder: |
|
||||
<details>
|
||||
|
||||
```
|
||||
[presence.nvim] Using runtime path: /run/user/1000
|
||||
[presence.nvim] Using Discord IPC socket path: /run/user/1000/discord-ipc-0
|
||||
[presence.nvim] Checking Discord IPC socket at /run/user/1000/discord-ipc-0...
|
||||
```
|
||||
|
||||
</details>
|
||||
value: |
|
||||
<details>
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
</details>
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Aditional info"
|
||||
description: "If you'd like to add anything else put it here."
|
||||
validations:
|
||||
required: false
|
34
.gitea/ISSUE_TEMPLATE/feature_request.yml
Normal file
34
.gitea/ISSUE_TEMPLATE/feature_request.yml
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: Feature request
|
||||
description: Report any errors, bugs, or unexpected behaviors related to presence.nvim
|
||||
title: "[FEAT]: "
|
||||
labels: [enhancement]
|
||||
assignees:
|
||||
- jiriks74
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Is your feature request related to a problem?
|
||||
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the solution you'd like
|
||||
description: A clear and concise description of what you want to happen.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe alternatives you've considered
|
||||
description: A clear and concise description of any alternative solutions or features you've considered.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add any other context or screenshots about the feature request here.
|
||||
validations:
|
||||
required: false
|
16
.gitea/workflows/luacheck.yml
Normal file
16
.gitea/workflows/luacheck.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Luacheck
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
Luacheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Luacheck
|
||||
run: |
|
||||
apt update && apt install lua-check -y
|
||||
|
||||
- name: Luacheck linter
|
||||
run: |
|
||||
luacheck .
|
12
.gitea/workflows/stylua.yml
Normal file
12
.gitea/workflows/stylua.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
name: StyLua
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
StyLuacheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: StyLua check
|
||||
run: |
|
||||
npx @johnnymorganz/stylua-bin .
|
9
.luacheckrc
Normal file
9
.luacheckrc
Normal file
|
@ -0,0 +1,9 @@
|
|||
std = {
|
||||
globals = {
|
||||
"vim",
|
||||
"require",
|
||||
},
|
||||
read_globals = {
|
||||
"fallback",
|
||||
},
|
||||
}
|
62
README.md
62
README.md
|
@ -15,39 +15,23 @@
|
|||
|
||||
```bash
|
||||
git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim
|
||||
nvim +PackerSync
|
||||
```
|
||||
|
||||
- Clone my config into `~/.config/nvim/lua/user`
|
||||
- For NeoVim >= 8.0
|
||||
|
||||
```bash
|
||||
git clone https://github.com/jiriks74/astronvim_config ~/.config/nvim/lua/user
|
||||
```
|
||||
|
||||
- For NeoVim < 8.0 use `neovim7.2` branch
|
||||
|
||||
```bash
|
||||
git clone -b neovim7.2 https://github.com/jiriks74/astronvim_config ~/.config/nvim/lua/user
|
||||
```
|
||||
|
||||
- Open nvim and run `:PackerSync`
|
||||
|
||||
```bash
|
||||
nvim +PackerSync
|
||||
```
|
||||
|
||||
## Useful info
|
||||
|
||||
- Folding with treesitter
|
||||
- To get folding for your language, you need to run
|
||||
`:TSInstall <language>` (eg. `TSInstall cpp` to get C++ folding)
|
||||
- Install language servers
|
||||
- Use `Space+p+I` keybind to open install menu.
|
||||
- Use `Space+p+m` keybind to open install menu.
|
||||
- To install package under the cursor, press `i`
|
||||
- To uninstall package under the cursor press `X`
|
||||
- Debugging
|
||||
- See `vimspector` under [`Extra plugin included`](#extra-plugins-included)
|
||||
- LaTeX
|
||||
- To use `vimtex` plugin, you need to have LaTeX installed
|
||||
- [`texlive-most`](https://wiki.archlinux.org/title/TeX_Live#Installation) package on ArchLinux
|
||||
|
@ -59,14 +43,6 @@ nvim +PackerSync
|
|||
|
||||
## Extra plugins included
|
||||
|
||||
- [vimspector](https://github.com/puremourning/vimspector)
|
||||
- Simple plugin for debugging
|
||||
- You need have to have `neovim` python module installed
|
||||
|
||||
```bash
|
||||
pip3 install neovim
|
||||
```
|
||||
|
||||
- You have to create a file with `Launch` config - see the [plugin repository](https://github.com/puremourning/vimspector)
|
||||
- [vim-pio](https://github.com/jiriks74/vim-pio)
|
||||
- PlatformIO vim plugin
|
||||
|
@ -94,37 +70,6 @@ nvim +PackerSync
|
|||
| CTRL+e | ["\<C-e\>"] | Copilot accept |
|
||||
| CTRL+s | ["\<C-s\>"] | Toggle autosave |
|
||||
|
||||
### Mappings for vimspector (debugging)
|
||||
|
||||
| Shortcut | Vim keybind | Description |
|
||||
|-------------|-------------------|--------------------|
|
||||
| Space+d+d | ["\<leader\>dd"] | Launch |
|
||||
| Space+d+S | ["\<leader\>dS"] | Stop |
|
||||
| Space+d+c | ["\<leader\>dc"] | Continue |
|
||||
| Space+d+p | ["\<leader\>dp"] | Pause |
|
||||
| Space+d+e | ["\<leader\>de"] | Reset |
|
||||
| Space+d+r | ["\<leader\>dr"] | Restart |
|
||||
| Space+d+R | ["\<leader\>dR"] | Run to cursor |
|
||||
| Space+d+C | ["\<leader\>dC"] | Go to current line |
|
||||
| Space+d+P | ["\<leader\>dP"] | Move cursor to the program counter in current frame |
|
||||
| | Breakpoints | |
|
||||
| Space+d+b+t | ["\<leader\>dbt"] | Toggle breakpoint |
|
||||
| Space+d+b+l | ["\<leader\>dbl"] | List breakpoints |
|
||||
| Space+d+b+c | ["\<leader\>dbc"] | Clear breakpoints |
|
||||
| Space+d+b+C | ["\<leader\>dbC"] | Toggle CBreakpoint or LogPoint on current line |
|
||||
| Space+d+b+f | ["\<leader\>dbf"] | Add a function breakpoint for expression under cursor |
|
||||
| Space+d+b+n | ["\<leader\>dbn"] | Jump to next breakpoint |
|
||||
| Space+d+b+p | ["\<leader\>dbp"] | Jump to previous breakpoint |
|
||||
| | Step keybinds | |
|
||||
| Space+d+s+s | ["\<leader\>dss"] | Step over |
|
||||
| Space+d+s+i | ["\<leader\>dsi"] | Step into |
|
||||
| Space+d+s+o | ["\<leader\>dso"] | Step out |
|
||||
| | Frame keybinds | |
|
||||
| Space+d+f+u | ["\<leader\>dfu"] | Up frame |
|
||||
| Space+d+f+d | ["\<leader\>dfd"] | Down frame |
|
||||
|
||||
There are also some [VSCode like keybinds setup by the plugin](https://github.com/puremourning/vimspector#visual-studio--vscode)
|
||||
|
||||
### Mappings for markdown preview
|
||||
|
||||
| Shortcut | Vim keybind | Description |
|
||||
|
@ -137,6 +82,8 @@ There are also some [VSCode like keybinds setup by the plugin](https://github.co
|
|||
|
||||
## TODO
|
||||
|
||||
- [ ] Nvim-DAP
|
||||
- Modified the default AstroNvim config
|
||||
- [ ] [Mappings for `vimtex`](#mappings-for-vimtex)
|
||||
- [ ] Better section for `vim-pio`
|
||||
- [ ] Add section for setting up debugging
|
||||
|
@ -146,7 +93,6 @@ There are also some [VSCode like keybinds setup by the plugin](https://github.co
|
|||
- [ ] Better [`README.md`](https://github.com/jiriks74/astronvim_config/blob/neovim7.2/README.md)
|
||||
for [`neovim7.2`](https://github.com/jiriks74/astronvim_config/tree/neovim7.2) branch
|
||||
- [ ] Add section redirecting to [`neovim72`](https://github.com/jiriks74/astronvim_config/tree/neovim7.2)
|
||||
branch's [`README.md`](https://github.com/jiriks74/astronvim_config/blob/neovim7.2/README.md) it user has Neovim < 8.0
|
||||
- [ ] Add `.vimspector.json` template
|
||||
branch's [`README.md`](https://github.com/jiriks74/astronvim_config/blob/neovim7.2/README.md) if user has Neovim < 8.0
|
||||
- [ ] Setting up simple wiki?
|
||||
- [ ] Add section for ["weirongxu/plantuml-previewer.vim"](https://github.com/weirongxu/plantuml-previewer.vim)
|
||||
|
|
|
@ -1,97 +0,0 @@
|
|||
local kind_icons = {
|
||||
NONE = "",
|
||||
Array = "",
|
||||
Boolean = "⊨",
|
||||
Class = "",
|
||||
Constructor = "",
|
||||
Key = "",
|
||||
Namespace = "",
|
||||
Null = "NULL",
|
||||
Number = "#",
|
||||
Object = "⦿",
|
||||
Package = "",
|
||||
Property = "",
|
||||
Reference = "",
|
||||
Snippet = "",
|
||||
String = "𝓐",
|
||||
TypeParameter = "",
|
||||
Unit = "",
|
||||
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Field = "ﰠ",
|
||||
Variable = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "פּ",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
Copilot = "",
|
||||
}
|
||||
local cmp = require("cmp")
|
||||
-- local has_words_before = function()
|
||||
-- if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then return false end
|
||||
-- local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
-- return col ~= 0 and vim.api.nvim_buf_get_text(0, line - 1, 0, line - 1, col, {})[1]:match("^%s*$") == nil
|
||||
-- end
|
||||
return {
|
||||
formatting = {
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
format = function(_, vim_item)
|
||||
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
-- completion = {
|
||||
-- keyword_length = 0,
|
||||
-- },
|
||||
-- mapping = {
|
||||
-- ["<Tab>"] = vim.schedule_wrap(function(fallback)
|
||||
-- if cmp.visible() and has_words_before() then
|
||||
-- cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
|
||||
-- else
|
||||
-- fallback()
|
||||
-- end
|
||||
-- end),
|
||||
-- ['<Tab>'] = cmp.mapping(function(fallback)
|
||||
-- if vim.fn['vsnip#jumpable'](1) == 1 then
|
||||
-- feedkey('<Plug>(vsnip-jump-next)', '')
|
||||
-- else
|
||||
-- local copilot_keys = vim.fn['copilot#Accept']()
|
||||
-- if copilot_keys ~= '' then
|
||||
-- vim.api.nvim_feedkeys(copilot_keys, 'i', true)
|
||||
-- else
|
||||
-- fallback()
|
||||
-- end
|
||||
-- end
|
||||
-- end, { 'i', 's' }),
|
||||
-- },
|
||||
}
|
||||
-- local cmp = require "cmp"
|
||||
-- local luasnip = require "luasnip"
|
||||
-- return {
|
||||
-- preselect = cmp.PreselectMode.None,
|
||||
-- mapping = {
|
||||
-- ["<CR>"] = cmp.mapping.confirm { select = false },
|
||||
-- ["<Tab>"] = cmp.mapping(function(fallback)
|
||||
-- if luasnip.expandable() then
|
||||
-- luasnip.expand()
|
||||
-- elseif luasnip.expand_or_jumpable() then
|
||||
-- luasnip.expand_or_jump()
|
||||
-- fallback()
|
||||
-- end
|
||||
-- end, {
|
||||
-- "i",
|
||||
-- "s",
|
||||
-- }),
|
||||
-- },
|
||||
-- }
|
Loading…
Reference in a new issue