mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
Merge branch 'rolling'
This commit is contained in:
commit
440324996c
12 changed files with 79 additions and 1746 deletions
|
@ -10,10 +10,9 @@ One of the best ways to begin contributing in a meaningful way is by helping fin
|
|||
|
||||
## Getting Started
|
||||
|
||||
1. Backup your ~/.config/nvim
|
||||
2. Follow the [Installation](https://www.lunarvim.org/01-installing.html) guide
|
||||
3. Link your fork with the repository `git remote add upstream https://github.com/lunarvim/LunarVim.git`
|
||||
4. That's it ! You can now `git fetch upstream` and `git rebase [-i] upstream/rolling` to update your branches with the latest contributions.
|
||||
1. Follow the [Installation](https://www.lunarvim.org/01-installing.html) guide
|
||||
2. Link your fork with the repository `git remote add upstream https://github.com/lunarvim/LunarVim.git`, or use `gh fork`
|
||||
3. That's it! You can now `git fetch upstream` and `git rebase [-i] upstream/rolling` to update your branches with the latest contributions.
|
||||
|
||||
<br />
|
||||
|
||||
|
@ -38,23 +37,25 @@ Install [pre-commit](https://github.com/pre-commit/pre-commit) which will run al
|
|||
## Code Conventions
|
||||
|
||||
All lua code is formatted with [Stylua](https://github.com/JohnnyMorganz/StyLua).
|
||||
* Use snake_case
|
||||
* Avoid platform-dependent code
|
||||
```bash
|
||||
stylua --config-path ./utils/.stylua.toml -c .
|
||||
# configurations are already stored in .stylua.toml
|
||||
stylua -c .
|
||||
```
|
||||
|
||||
All shell code is formatted according to [Google Shell Style Guide](https://google.github.io/styleguide/shellguide.html)
|
||||
* use two spaces instead of tabs
|
||||
```bash
|
||||
shfmt -i 2 -ci -l -d .
|
||||
shfmt -i 2 -ci -bn -l -d .
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
## Pull Requests (PRs)
|
||||
|
||||
To avoid duplicate work, create a draft pull request.
|
||||
- To avoid duplicate work, create a draft pull request.
|
||||
- Your PR must pass all the [automated-ci-tests](https://github.com/neovim/neovim/actions).
|
||||
- Use a [git-feature-branch](https://www.atlassian.com/git/tutorials/comparing-workflows) instead of the master/rolling branch.
|
||||
- Use a [rebase-workflow](http://git-scm.com/book/en/v2/Git-Branching-Rebasing).
|
||||
|
||||
### Commit Messages
|
||||
* Commit header is limited to 72 characters.
|
||||
|
@ -81,11 +82,12 @@ To avoid duplicate work, create a draft pull request.
|
|||
* **build**: changes that affect the build system or external dependencies (example scopes: npm, pip, rg)
|
||||
* **ci**: changes to CI configuration files and scripts (example scopes: format, lint, issue_templates)
|
||||
* **docs**: changes to the documentation only
|
||||
* **feat**: a new feature for the user
|
||||
* **fix**: a bug fix
|
||||
* **perf**: a performance improvement
|
||||
* **refactor**: a code change that neither fixes a bug nor adds a feature
|
||||
* **test**: Adding missing tests or correcting existing tests
|
||||
* **feat**: new feature for the user
|
||||
* **fix**: bug fix
|
||||
* **perf**: performance improvement
|
||||
* **refactor**: code change that neither fixes a bug nor adds a feature
|
||||
* **test**: adding missing tests or correcting existing tests
|
||||
* **chore**: all the rest, including version bump for plugins
|
||||
|
||||
**Real world examples:**
|
||||
```
|
||||
|
|
2
Makefile
2
Makefile
|
@ -37,6 +37,6 @@ style-sh:
|
|||
shfmt -f . | grep -v jdtls | xargs shfmt -i 2 -ci -bn -l -d
|
||||
|
||||
test:
|
||||
bash ./utils/bin/test_runner.sh "$(TEST)"
|
||||
bash ./utils/ci/run_test.sh "$(TEST)"
|
||||
|
||||
.PHONY: install install-neovim-binary uninstall lint style test
|
||||
|
|
|
@ -18,7 +18,7 @@ function M.config()
|
|||
enable = true,
|
||||
auto_open = true,
|
||||
},
|
||||
auto_close = true,
|
||||
auto_close = false,
|
||||
open_on_tab = false,
|
||||
hijack_cursor = false,
|
||||
update_cwd = false,
|
||||
|
@ -42,24 +42,30 @@ function M.config()
|
|||
},
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = true,
|
||||
ignore = false,
|
||||
timeout = 200,
|
||||
},
|
||||
view = {
|
||||
width = 30,
|
||||
height = 30,
|
||||
hide_root_folder = false,
|
||||
side = "left",
|
||||
auto_resize = true,
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
auto_resize = false,
|
||||
mappings = {
|
||||
custom_only = false,
|
||||
list = {},
|
||||
},
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
signcolumn = "yes",
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
custom = { ".git", "node_modules", ".cache" },
|
||||
custom = { "node_modules", ".cache" },
|
||||
},
|
||||
trash = {
|
||||
cmd = "trash",
|
||||
require_confirm = true,
|
||||
},
|
||||
},
|
||||
show_icons = {
|
||||
|
@ -130,43 +136,41 @@ function M.setup()
|
|||
}
|
||||
end
|
||||
|
||||
-- Add nvim_tree open callback
|
||||
local tree_view = require "nvim-tree.view"
|
||||
local open = tree_view.open
|
||||
tree_view.open = function()
|
||||
M.on_open()
|
||||
open()
|
||||
local function on_open()
|
||||
if package.loaded["bufferline.state"] and lvim.builtin.nvimtree.setup.view.side == "left" then
|
||||
require("bufferline.state").set_offset(lvim.builtin.nvimtree.setup.view.width + 1, "")
|
||||
end
|
||||
end
|
||||
|
||||
vim.cmd "au WinClosed * lua require('lvim.core.nvimtree').on_close()"
|
||||
local function on_close()
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
local ft = vim.api.nvim_buf_get_option(bufnr, "filetype")
|
||||
if ft == "NvimTree" and package.loaded["bufferline.state"] then
|
||||
require("bufferline.state").set_offset(0)
|
||||
end
|
||||
end
|
||||
|
||||
local tree_view = require "nvim-tree.view"
|
||||
local default_open = tree_view.open
|
||||
local default_close = tree_view.close
|
||||
|
||||
tree_view.open = function()
|
||||
on_open()
|
||||
default_open()
|
||||
end
|
||||
|
||||
tree_view.close = function()
|
||||
on_close()
|
||||
default_close()
|
||||
end
|
||||
|
||||
if lvim.builtin.nvimtree.on_config_done then
|
||||
lvim.builtin.nvimtree.on_config_done(nvim_tree_config)
|
||||
end
|
||||
|
||||
require("nvim-tree").setup(lvim.builtin.nvimtree.setup)
|
||||
end
|
||||
|
||||
function M.on_open()
|
||||
if package.loaded["bufferline.state"] and lvim.builtin.nvimtree.setup.view.side == "left" then
|
||||
require("bufferline.state").set_offset(lvim.builtin.nvimtree.setup.view.width + 1, "")
|
||||
end
|
||||
end
|
||||
|
||||
function M.on_close()
|
||||
local buf = tonumber(vim.fn.expand "<abuf>")
|
||||
local ft = vim.api.nvim_buf_get_option(buf, "filetype")
|
||||
if ft == "NvimTree" and package.loaded["bufferline.state"] then
|
||||
require("bufferline.state").set_offset(0)
|
||||
end
|
||||
end
|
||||
|
||||
function M.change_tree_dir(dir)
|
||||
local lib_status_ok, lib = pcall(require, "nvim-tree.lib")
|
||||
if lib_status_ok then
|
||||
lib.change_dir(dir)
|
||||
end
|
||||
end
|
||||
|
||||
function M.start_telescope(telescope_mode)
|
||||
local node = require("nvim-tree.lib").get_node_at_cursor()
|
||||
local abspath = node.link_to or node.absolute_path
|
||||
|
|
|
@ -23,8 +23,9 @@ return {
|
|||
prefix = "",
|
||||
format = function(d)
|
||||
local t = vim.deepcopy(d)
|
||||
if d.code then
|
||||
t.message = string.format("%s [%s]", t.message, t.code):gsub("1. ", "")
|
||||
local code = d.code or d.user_data.lsp.code
|
||||
if code then
|
||||
t.message = string.format("%s [%s]", t.message, code):gsub("1. ", "")
|
||||
end
|
||||
return t.message
|
||||
end,
|
||||
|
@ -77,6 +78,7 @@ return {
|
|||
"jedi_language_server",
|
||||
"ltex",
|
||||
"phpactor",
|
||||
"psalm",
|
||||
"pylsp",
|
||||
"quick_lint_js",
|
||||
"remark_ls",
|
||||
|
|
|
@ -2,27 +2,27 @@ local commit = {
|
|||
barbar = "6e638309efcad2f308eb9c5eaccf6f62b794bbab",
|
||||
cmp_buffer = "f83773e2f433a923997c5faad7ea689ec24d1785",
|
||||
cmp_luasnip = "d6f837f4e8fe48eeae288e638691b91b97d1737f",
|
||||
cmp_nvim_lsp = "b4251f0fca1daeb6db5d60a23ca81507acf858c2",
|
||||
cmp_path = "4d58224e315426e5ac4c5b218ca86cab85f80c79",
|
||||
cmp_nvim_lsp = "ebdfc204afb87f15ce3d3d3f5df0b8181443b5ba",
|
||||
cmp_path = "c5230cb439df9547294678d0f1c1465ad7989e5f",
|
||||
comment = "90df2f87c0b17193d073d1f72cea2e528e5b162d",
|
||||
dapinstall = "568d946a99edb6780912cb39ca68c368516cd853",
|
||||
dashboard_nvim = "d82ddae95fd4dc4c3b7bbe87f09b1840fbf20ecb",
|
||||
fixcursorhold = "0e4e22d21975da60b0fd2d302285b3b603f9f71e",
|
||||
friendly_snippets = "9f04462bcabfd108341a6e47ed742b09a6a5b975",
|
||||
gitsigns = "7aad5257fa043b9acf3d40ae064a1685003254da",
|
||||
friendly_snippets = "d4f5c0507cfe4c67024f58c84ba982f7f5c71a7a",
|
||||
gitsigns = "f4648dcc055a10573f36e83343592824155ab466",
|
||||
lua_dev = "03a44ec6a54b0a025a633978e8541584a02e46d9",
|
||||
lualine = "bc5c2f5658821f98e55013eb3bec9d540c420470",
|
||||
luasnip = "79662d8bb61bbee6af88bf559d9ed41c28eb5b88",
|
||||
nlsp_settings = "1d74d46627204bb9bc32787b6d1360874ce9ae1d",
|
||||
null_ls = "288c4582f62f04944412acaed098fc16a1818464",
|
||||
nvim_autopairs = "c027bbb7eb417ad0be7d5263b66c1638e971e36b",
|
||||
nvim_cmp = "ce0a3581e0fa6e3072bf06a97919d3e214ff00e6",
|
||||
nvim_dap = "3499eb4368fa5835de761b4f6cd53f7bf0bd02f7",
|
||||
nvim_lsp_installer = "a744a2a1c7fb9830b156a57a1327a6593f9b5bf8",
|
||||
nvim_lspconfig = "2c70b7b0095b4bbe55aaf0dc27a2581d1cafe491",
|
||||
lualine = "70691ae350fdbe1f15758e3b8e2973742a7967a9",
|
||||
luasnip = "0222ee63c9e4b80e6000d064f8efd8edcc6d0c48",
|
||||
nlsp_settings = "3a3942b5d1da30e3ca0dc431aada3191c5952054",
|
||||
null_ls = "afd9a999fa29077e12b7284cf11dff37972fbce5",
|
||||
nvim_autopairs = "97e454ce9b1371373105716d196c1017394bc947",
|
||||
nvim_cmp = "4c0a6512a0f8a235213959badf70031b9fa0220a",
|
||||
nvim_dap = "08349ab5da2148965deb2e778065017059bff584",
|
||||
nvim_lsp_installer = "9894db12783fdd02be909cdd60e6d0fc20b9e46e",
|
||||
nvim_lspconfig = "09130804eb27fd31539922967d14c28388765ae4",
|
||||
nvim_notify = "15f52efacd169ea26b0f4070451d3ea53f98cd5a",
|
||||
nvim_tree = "0a2f6b0b6ba558a88c77a6b262af647760e6eca8",
|
||||
nvim_treesitter = "ed6143940c37c5c18625d46c071563a3b4338e72",
|
||||
nvim_treesitter = "723d91e8217ae66ea75f809f404d801ed939f497",
|
||||
nvim_ts_context_commentstring = "097df33c9ef5bbd3828105e4bee99965b758dc3f",
|
||||
nvim_web_devicons = "ac71ca88b1136e1ecb2aefef4948130f31aa40d1",
|
||||
packer = "851c62c5ecd3b5adc91665feda8f977e104162a5",
|
||||
|
@ -30,9 +30,9 @@ local commit = {
|
|||
popup = "b7404d35d5d3548a82149238289fa71f7f6de4ac",
|
||||
project = "71d0e23dcfc43cfd6bb2a97dc5a7de1ab47a6538",
|
||||
structlog = "6f1403a192791ff1fa7ac845a73de9e860f781f1",
|
||||
telescope = "015a35626d5a293dc9c19dc2bb301f25850961f6",
|
||||
telescope = "0011b1148d3975600f5a9f0be8058cdaac4e30d9",
|
||||
telescope_fzf_native = "b8662b076175e75e6497c59f3e2799b879d7b954",
|
||||
toggleterm = "463843d1ba0288eedaf834872c3eca114d45bddf",
|
||||
toggleterm = "f23866b8fbb0703be4e15d50c814ffe496242a67",
|
||||
which_key = "387fd676d3f9b419d38890820f6e262dc0fadb46",
|
||||
}
|
||||
|
||||
|
@ -120,9 +120,11 @@ return {
|
|||
commit = commit.cmp_path,
|
||||
},
|
||||
{
|
||||
"folke/lua-dev.nvim",
|
||||
-- "folke/lua-dev.nvim",
|
||||
"kylo252/lua-dev.nvim",
|
||||
branch = "fix-on-new-config",
|
||||
module = "lua-dev",
|
||||
commit = commit.lua_dev,
|
||||
-- commit = commit.lua_dev,
|
||||
},
|
||||
|
||||
-- Autopairs
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
A Lush Theme for Neovim.
|
||||
===
|
||||
|
||||
See: http://git.io/lush.nvim for more information on Lush and a helper script
|
||||
to setup your repo clone.
|
|
@ -1,21 +0,0 @@
|
|||
" You probably always want to set this in your vim file
|
||||
set background=dark
|
||||
let g:colors_name="lush_template"
|
||||
|
||||
" By setting our module to nil, we clear lua's cache,
|
||||
" which means the require ahead will *always* occur.
|
||||
"
|
||||
" This isn't strictly required but it can be a useful trick if you are
|
||||
" incrementally editing your config a lot and want to be sure your themes
|
||||
" changes are being picked up without restarting neovim.
|
||||
"
|
||||
" Note if you're working in on your theme and have :Lushify'd the buffer,
|
||||
" your changes will be applied with our without the following line.
|
||||
"
|
||||
" The performance impact of this call can be measured in the hundreds of
|
||||
" *nanoseconds* and such could be considered "production safe".
|
||||
lua package.loaded['lush_theme.lush_template'] = nil
|
||||
|
||||
" include our theme file and pass it to lush to apply
|
||||
lua require('lush')(require('lush_theme.lush_template'))
|
||||
|
|
@ -1,268 +0,0 @@
|
|||
--
|
||||
-- Built with,
|
||||
--
|
||||
-- ,gggg,
|
||||
-- d8" "8I ,dPYb,
|
||||
-- 88 ,dP IP'`Yb
|
||||
-- 8888888P" I8 8I
|
||||
-- 88 I8 8'
|
||||
-- 88 gg gg ,g, I8 dPgg,
|
||||
-- ,aa,_88 I8 8I ,8'8, I8dP" "8I
|
||||
-- dP" "88P I8, ,8I ,8' Yb I8P I8
|
||||
-- Yb,_,d88b,,_ ,d8b, ,d8b,,8'_ 8) ,d8 I8,
|
||||
-- "Y8P" "Y888888P'"Y88P"`Y8P' "YY8P8P88P `Y8
|
||||
--
|
||||
|
||||
-- This is a starter colorscheme for use with Lush,
|
||||
-- for usage guides, see :h lush or :LushRunTutorial
|
||||
|
||||
--
|
||||
-- Note: Because this is lua file, vim will append your file to the runtime,
|
||||
-- which means you can require(...) it in other lua code (this is useful),
|
||||
-- but you should also take care not to conflict with other libraries.
|
||||
--
|
||||
-- (This is a lua quirk, as it has somewhat poor support for namespacing.)
|
||||
--
|
||||
-- Basically, name your file,
|
||||
--
|
||||
-- "super_theme/lua/lush_theme/super_theme_dark.lua",
|
||||
--
|
||||
-- not,
|
||||
--
|
||||
-- "super_theme/lua/dark.lua".
|
||||
--
|
||||
-- With that caveat out of the way...
|
||||
--
|
||||
|
||||
-- Enable lush.ify on this file, run:
|
||||
--
|
||||
-- `:Lushify`
|
||||
--
|
||||
-- or
|
||||
--
|
||||
-- `:lua require('lush').ify()`
|
||||
|
||||
local lush = require "lush"
|
||||
|
||||
local theme = lush(function()
|
||||
return {
|
||||
-- The following are all the Neovim default highlight groups from the docs
|
||||
-- as of 0.5.0-nightly-446, to aid your theme creation. Your themes should
|
||||
-- probably style all of these at a bare minimum.
|
||||
--
|
||||
-- Referenced/linked groups must come before being referenced/lined,
|
||||
-- so the order shown ((mostly) alphabetical) is likely
|
||||
-- not the order you will end up with.
|
||||
--
|
||||
-- You can uncomment these and leave them empty to disable any
|
||||
-- styling for that group (meaning they mostly get styled as Normal)
|
||||
-- or leave them commented to apply vims default colouring or linking.
|
||||
|
||||
-- Comment { }, -- any comment
|
||||
-- ColorColumn { }, -- used for the columns set with 'colorcolumn'
|
||||
-- Conceal { }, -- placeholder characters substituted for concealed text (see 'conceallevel')
|
||||
-- Cursor { }, -- character under the cursor
|
||||
-- lCursor { }, -- the character under the cursor when |language-mapping| is used (see 'guicursor')
|
||||
-- CursorIM { }, -- like Cursor, but used when in IME mode |CursorIM|
|
||||
-- CursorColumn { }, -- Screen-column at the cursor, when 'cursorcolumn' is set.
|
||||
-- CursorLine { }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set.
|
||||
-- Directory { }, -- directory names (and other special names in listings)
|
||||
-- DiffAdd { }, -- diff mode: Added line |diff.txt|
|
||||
-- DiffChange { }, -- diff mode: Changed line |diff.txt|
|
||||
-- DiffDelete { }, -- diff mode: Deleted line |diff.txt|
|
||||
-- DiffText { }, -- diff mode: Changed text within a changed line |diff.txt|
|
||||
-- EndOfBuffer { }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
|
||||
-- TermCursor { }, -- cursor in a focused terminal
|
||||
-- TermCursorNC { }, -- cursor in an unfocused terminal
|
||||
-- ErrorMsg { }, -- error messages on the command line
|
||||
-- VertSplit { }, -- the column separating vertically split windows
|
||||
-- Folded { }, -- line used for closed folds
|
||||
-- FoldColumn { }, -- 'foldcolumn'
|
||||
-- SignColumn { }, -- column where |signs| are displayed
|
||||
-- IncSearch { }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
|
||||
-- Substitute { }, -- |:substitute| replacement text highlighting
|
||||
-- LineNr { }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
|
||||
-- CursorLineNr { }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
|
||||
-- MatchParen { }, -- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt|
|
||||
-- ModeMsg { }, -- 'showmode' message (e.g., "-- INSERT -- ")
|
||||
-- MsgArea { }, -- Area for messages and cmdline
|
||||
-- MsgSeparator { }, -- Separator for scrolled messages, `msgsep` flag of 'display'
|
||||
-- MoreMsg { }, -- |more-prompt|
|
||||
-- NonText { }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|.
|
||||
-- Normal { }, -- normal text
|
||||
-- NormalFloat { }, -- Normal text in floating windows.
|
||||
-- NormalNC { }, -- normal text in non-current windows
|
||||
-- Pmenu { }, -- Popup menu: normal item.
|
||||
-- PmenuSel { }, -- Popup menu: selected item.
|
||||
-- PmenuSbar { }, -- Popup menu: scrollbar.
|
||||
-- PmenuThumb { }, -- Popup menu: Thumb of the scrollbar.
|
||||
-- Question { }, -- |hit-enter| prompt and yes/no questions
|
||||
-- QuickFixLine { }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there.
|
||||
-- Search { }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
|
||||
-- SpecialKey { }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace|
|
||||
-- SpellBad { }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise.
|
||||
-- SpellCap { }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise.
|
||||
-- SpellLocal { }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise.
|
||||
-- SpellRare { }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise.
|
||||
-- StatusLine { }, -- status line of current window
|
||||
-- StatusLineNC { }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window.
|
||||
-- TabLine { }, -- tab pages line, not active tab page label
|
||||
-- TabLineFill { }, -- tab pages line, where there are no labels
|
||||
-- TabLineSel { }, -- tab pages line, active tab page label
|
||||
-- Title { }, -- titles for output from ":set all", ":autocmd" etc.
|
||||
-- Visual { }, -- Visual mode selection
|
||||
-- VisualNOS { }, -- Visual mode selection when vim is "Not Owning the Selection".
|
||||
-- WarningMsg { }, -- warning messages
|
||||
-- Whitespace { }, -- "nbsp", "space", "tab" and "trail" in 'listchars'
|
||||
-- WildMenu { }, -- current match in 'wildmenu' completion
|
||||
|
||||
-- These groups are not listed as default vim groups,
|
||||
-- but they are defacto standard group names for syntax highlighting.
|
||||
-- commented out groups should chain up to their "preferred" group by
|
||||
-- default,
|
||||
-- Uncomment and edit if you want more specific syntax highlighting.
|
||||
|
||||
-- Constant { }, -- (preferred) any constant
|
||||
-- String { }, -- a string constant: "this is a string"
|
||||
-- Character { }, -- a character constant: 'c', '\n'
|
||||
-- Number { }, -- a number constant: 234, 0xff
|
||||
-- Boolean { }, -- a boolean constant: TRUE, false
|
||||
-- Float { }, -- a floating point constant: 2.3e10
|
||||
|
||||
-- Identifier { }, -- (preferred) any variable name
|
||||
-- Function { }, -- function name (also: methods for classes)
|
||||
|
||||
-- Statement { }, -- (preferred) any statement
|
||||
-- Conditional { }, -- if, then, else, endif, switch, etc.
|
||||
-- Repeat { }, -- for, do, while, etc.
|
||||
-- Label { }, -- case, default, etc.
|
||||
-- Operator { }, -- "sizeof", "+", "*", etc.
|
||||
-- Keyword { }, -- any other keyword
|
||||
-- Exception { }, -- try, catch, throw
|
||||
|
||||
-- PreProc { }, -- (preferred) generic Preprocessor
|
||||
-- Include { }, -- preprocessor #include
|
||||
-- Define { }, -- preprocessor #define
|
||||
-- Macro { }, -- same as Define
|
||||
-- PreCondit { }, -- preprocessor #if, #else, #endif, etc.
|
||||
|
||||
-- Type { }, -- (preferred) int, long, char, etc.
|
||||
-- StorageClass { }, -- static, register, volatile, etc.
|
||||
-- Structure { }, -- struct, union, enum, etc.
|
||||
-- Typedef { }, -- A typedef
|
||||
|
||||
-- Special { }, -- (preferred) any special symbol
|
||||
-- SpecialChar { }, -- special character in a constant
|
||||
-- Tag { }, -- you can use CTRL-] on this
|
||||
-- Delimiter { }, -- character that needs attention
|
||||
-- SpecialComment { }, -- special things inside a comment
|
||||
-- Debug { }, -- debugging statements
|
||||
|
||||
-- Underlined { gui = "underline" }, -- (preferred) text that stands out, HTML links
|
||||
-- Bold { gui = "bold" },
|
||||
-- Italic { gui = "italic" },
|
||||
|
||||
-- ("Ignore", below, may be invisible...)
|
||||
-- Ignore { }, -- (preferred) left blank, hidden |hl-Ignore|
|
||||
|
||||
-- Error { }, -- (preferred) any erroneous construct
|
||||
|
||||
-- Todo { }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX
|
||||
|
||||
-- These groups are for the native LSP client. Some other LSP clients may
|
||||
-- use these groups, or use their own. Consult your LSP client's
|
||||
-- documentation.
|
||||
|
||||
-- LspReferenceText { }, -- used for highlighting "text" references
|
||||
-- LspReferenceRead { }, -- used for highlighting "read" references
|
||||
-- LspReferenceWrite { }, -- used for highlighting "write" references
|
||||
|
||||
-- LspDiagnosticsDefaultError { }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline)
|
||||
-- LspDiagnosticsDefaultWarning { }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline)
|
||||
-- LspDiagnosticsDefaultInformation { }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline)
|
||||
-- LspDiagnosticsDefaultHint { }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline)
|
||||
|
||||
-- LspDiagnosticsVirtualTextError { }, -- Used for "Error" diagnostic virtual text
|
||||
-- LspDiagnosticsVirtualTextWarning { }, -- Used for "Warning" diagnostic virtual text
|
||||
-- LspDiagnosticsVirtualTextInformation { }, -- Used for "Information" diagnostic virtual text
|
||||
-- LspDiagnosticsVirtualTextHint { }, -- Used for "Hint" diagnostic virtual text
|
||||
|
||||
-- LspDiagnosticsUnderlineError { }, -- Used to underline "Error" diagnostics
|
||||
-- LspDiagnosticsUnderlineWarning { }, -- Used to underline "Warning" diagnostics
|
||||
-- LspDiagnosticsUnderlineInformation { }, -- Used to underline "Information" diagnostics
|
||||
-- LspDiagnosticsUnderlineHint { }, -- Used to underline "Hint" diagnostics
|
||||
|
||||
-- LspDiagnosticsFloatingError { }, -- Used to color "Error" diagnostic messages in diagnostics float
|
||||
-- LspDiagnosticsFloatingWarning { }, -- Used to color "Warning" diagnostic messages in diagnostics float
|
||||
-- LspDiagnosticsFloatingInformation { }, -- Used to color "Information" diagnostic messages in diagnostics float
|
||||
-- LspDiagnosticsFloatingHint { }, -- Used to color "Hint" diagnostic messages in diagnostics float
|
||||
|
||||
-- LspDiagnosticsSignError { }, -- Used for "Error" signs in sign column
|
||||
-- LspDiagnosticsSignWarning { }, -- Used for "Warning" signs in sign column
|
||||
-- LspDiagnosticsSignInformation { }, -- Used for "Information" signs in sign column
|
||||
-- LspDiagnosticsSignHint { }, -- Used for "Hint" signs in sign column
|
||||
|
||||
-- These groups are for the neovim tree-sitter highlights.
|
||||
-- As of writing, tree-sitter support is a WIP, group names may change.
|
||||
-- By default, most of these groups link to an appropriate Vim group,
|
||||
-- TSError -> Error for example, so you do not have to define these unless
|
||||
-- you explicitly want to support Treesitter's improved syntax awareness.
|
||||
|
||||
-- TSAnnotation { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information.
|
||||
-- TSAttribute { }; -- (unstable) TODO: docs
|
||||
-- TSBoolean { }; -- For booleans.
|
||||
-- TSCharacter { }; -- For characters.
|
||||
-- TSComment { }; -- For comment blocks.
|
||||
-- TSConstructor { }; -- For constructor calls and definitions: ` { }` in Lua, and Java constructors.
|
||||
-- TSConditional { }; -- For keywords related to conditionnals.
|
||||
-- TSConstant { }; -- For constants
|
||||
-- TSConstBuiltin { }; -- For constant that are built in the language: `nil` in Lua.
|
||||
-- TSConstMacro { }; -- For constants that are defined by macros: `NULL` in C.
|
||||
-- TSError { }; -- For syntax/parser errors.
|
||||
-- TSException { }; -- For exception related keywords.
|
||||
-- TSField { }; -- For fields.
|
||||
-- TSFloat { }; -- For floats.
|
||||
-- TSFunction { }; -- For function (calls and definitions).
|
||||
-- TSFuncBuiltin { }; -- For builtin functions: `table.insert` in Lua.
|
||||
-- TSFuncMacro { }; -- For macro defined fuctions (calls and definitions): each `macro_rules` in Rust.
|
||||
-- TSInclude { }; -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua.
|
||||
-- TSKeyword { }; -- For keywords that don't fall in previous categories.
|
||||
-- TSKeywordFunction { }; -- For keywords used to define a fuction.
|
||||
-- TSLabel { }; -- For labels: `label:` in C and `:label:` in Lua.
|
||||
-- TSMethod { }; -- For method calls and definitions.
|
||||
-- TSNamespace { }; -- For identifiers referring to modules and namespaces.
|
||||
-- TSNone { }; -- TODO: docs
|
||||
-- TSNumber { }; -- For all numbers
|
||||
-- TSOperator { }; -- For any operator: `+`, but also `->` and `*` in C.
|
||||
-- TSParameter { }; -- For parameters of a function.
|
||||
-- TSParameterReference { }; -- For references to parameters of a function.
|
||||
-- TSProperty { }; -- Same as `TSField`.
|
||||
-- TSPunctDelimiter { }; -- For delimiters ie: `.`
|
||||
-- TSPunctBracket { }; -- For brackets and parens.
|
||||
-- TSPunctSpecial { }; -- For special punctutation that does not fall in the catagories before.
|
||||
-- TSRepeat { }; -- For keywords related to loops.
|
||||
-- TSString { }; -- For strings.
|
||||
-- TSStringRegex { }; -- For regexes.
|
||||
-- TSStringEscape { }; -- For escape characters within a string.
|
||||
-- TSSymbol { }; -- For identifiers referring to symbols or atoms.
|
||||
-- TSType { }; -- For types.
|
||||
-- TSTypeBuiltin { }; -- For builtin types.
|
||||
-- TSVariable { }; -- Any variable name that does not have another highlight.
|
||||
-- TSVariableBuiltin { }; -- Variable names that are defined by the languages, like `this` or `self`.
|
||||
|
||||
-- TSTag { }; -- Tags like html tag names.
|
||||
-- TSTagDelimiter { }; -- Tag delimiter like `<` `>` `/`
|
||||
-- TSText { }; -- For strings considered text in a markup language.
|
||||
-- TSEmphasis { }; -- For text to be represented with emphasis.
|
||||
-- TSUnderline { }; -- For text to be represented with an underline.
|
||||
-- TSStrike { }; -- For strikethrough text.
|
||||
-- TSTitle { }; -- Text that is part of a title.
|
||||
-- TSLiteral { }; -- Literal text.
|
||||
-- TSURI { }; -- Any URI like a link or email.
|
||||
}
|
||||
end)
|
||||
|
||||
-- return our parsed theme for extension or use else where.
|
||||
return theme
|
||||
|
||||
-- vi:nowrap
|
|
@ -1,84 +0,0 @@
|
|||
" packadd quickscope
|
||||
|
||||
" execute 'luafile ' . stdpath('config') . '/lua/settings.lua'
|
||||
|
||||
function! s:manageEditorSize(...)
|
||||
let count = a:1
|
||||
let to = a:2
|
||||
for i in range(1, count ? count : 1)
|
||||
call VSCodeNotify(to == 'increase' ? 'workbench.action.increaseViewSize' : 'workbench.action.decreaseViewSize')
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! s:vscodeCommentary(...) abort
|
||||
if !a:0
|
||||
let &operatorfunc = matchstr(expand('<sfile>'), '[^. ]*$')
|
||||
return 'g@'
|
||||
elseif a:0 > 1
|
||||
let [line1, line2] = [a:1, a:2]
|
||||
else
|
||||
let [line1, line2] = [line("'["), line("']")]
|
||||
endif
|
||||
|
||||
call VSCodeCallRange("editor.action.commentLine", line1, line2, 0)
|
||||
endfunction
|
||||
|
||||
function! s:openVSCodeCommandsInVisualMode()
|
||||
normal! gv
|
||||
let visualmode = visualmode()
|
||||
if visualmode == "V"
|
||||
let startLine = line("v")
|
||||
let endLine = line(".")
|
||||
call VSCodeNotifyRange("workbench.action.showCommands", startLine, endLine, 1)
|
||||
else
|
||||
let startPos = getpos("v")
|
||||
let endPos = getpos(".")
|
||||
call VSCodeNotifyRangePos("workbench.action.showCommands", startPos[1], endPos[1], startPos[2], endPos[2], 1)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:openWhichKeyInVisualMode()
|
||||
normal! gv
|
||||
let visualmode = visualmode()
|
||||
if visualmode == "V"
|
||||
let startLine = line("v")
|
||||
let endLine = line(".")
|
||||
call VSCodeNotifyRange("whichkey.show", startLine, endLine, 1)
|
||||
else
|
||||
let startPos = getpos("v")
|
||||
let endPos = getpos(".")
|
||||
call VSCodeNotifyRangePos("whichkey.show", startPos[1], endPos[1], startPos[2], endPos[2], 1)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Better Navigation
|
||||
nnoremap <silent> <C-j> :call VSCodeNotify('workbench.action.navigateDown')<CR>
|
||||
xnoremap <silent> <C-j> :call VSCodeNotify('workbench.action.navigateDown')<CR>
|
||||
nnoremap <silent> <C-k> :call VSCodeNotify('workbench.action.navigateUp')<CR>
|
||||
xnoremap <silent> <C-k> :call VSCodeNotify('workbench.action.navigateUp')<CR>
|
||||
nnoremap <silent> <C-h> :call VSCodeNotify('workbench.action.navigateLeft')<CR>
|
||||
xnoremap <silent> <C-h> :call VSCodeNotify('workbench.action.navigateLeft')<CR>
|
||||
nnoremap <silent> <C-l> :call VSCodeNotify('workbench.action.navigateRight')<CR>
|
||||
xnoremap <silent> <C-l> :call VSCodeNotify('workbench.action.navigateRight')<CR>
|
||||
|
||||
nnoremap gr <Cmd>call VSCodeNotify('editor.action.goToReferences')<CR>
|
||||
|
||||
" Bind C-/ to vscode commentary since calling from vscode produces double comments due to multiple cursors
|
||||
xnoremap <expr> <C-/> <SID>vscodeCommentary()
|
||||
nnoremap <expr> <C-/> <SID>vscodeCommentary() . '_'
|
||||
|
||||
nnoremap <silent> <C-w>_ :<C-u>call VSCodeNotify('workbench.action.toggleEditorWidths')<CR>
|
||||
|
||||
nnoremap <silent> <Space> :call VSCodeNotify('whichkey.show')<CR>
|
||||
xnoremap <silent> <Space> :<C-u>call <SID>openWhichKeyInVisualMode()<CR>
|
||||
|
||||
xnoremap <silent> <C-P> :<C-u>call <SID>openVSCodeCommandsInVisualMode()<CR>
|
||||
|
||||
xmap gc <Plug>VSCodeCommentary
|
||||
nmap gc <Plug>VSCodeCommentary
|
||||
omap gc <Plug>VSCodeCommentary
|
||||
nmap gcc <Plug>VSCodeCommentaryLine
|
||||
|
||||
" Simulate same TAB behavior in VSCode
|
||||
nmap <Tab> :Tabnext<CR>
|
||||
nmap <S-Tab> :Tabprev<CR>
|
|
@ -1,171 +0,0 @@
|
|||
[
|
||||
{
|
||||
"key": "shift+ctrl+e",
|
||||
"command": "actions.findWithSelection"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+e",
|
||||
"command": "-actions.findWithSelection"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+e",
|
||||
"command": "workbench.view.explorer"
|
||||
},
|
||||
{
|
||||
"key": "shift+ctrl+e",
|
||||
"command": "-workbench.view.explorer"
|
||||
},
|
||||
{
|
||||
"key": "r",
|
||||
"command": "renameFile",
|
||||
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "enter",
|
||||
"command": "-renameFile",
|
||||
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "j",
|
||||
"command": "list.focusDown",
|
||||
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "k",
|
||||
"command": "list.focusUp",
|
||||
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "selectNextSuggestion",
|
||||
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k",
|
||||
"command": "selectPrevSuggestion",
|
||||
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "workbench.action.quickOpenNavigateNext",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "tab",
|
||||
"command": "selectNextSuggestion",
|
||||
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible"
|
||||
},
|
||||
{
|
||||
"key": "tab",
|
||||
"command": "workbench.action.quickOpenNavigateNext",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "shift+tab",
|
||||
"command": "selectPrevSuggestion",
|
||||
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible"
|
||||
},
|
||||
{
|
||||
"key": "shift+tab",
|
||||
"command": "workbench.action.quickOpenNavigatePrevious",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k",
|
||||
"command": "workbench.action.quickOpenNavigatePrevious",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "enter",
|
||||
"command": "list.select",
|
||||
"when": "explorerViewletVisible && filesExplorerFocus"
|
||||
},
|
||||
{
|
||||
"key": "l",
|
||||
"command": "list.select",
|
||||
"when": "explorerViewletVisible && filesExplorerFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "o",
|
||||
"command": "list.toggleExpand",
|
||||
"when": "explorerViewletVisible && filesExplorerFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "h",
|
||||
"command": "list.collapse",
|
||||
"when": "explorerViewletVisible && filesExplorerFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "a",
|
||||
"command": "explorer.newFile",
|
||||
"when": "filesExplorerFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "shift+a",
|
||||
"command": "explorer.newFolder",
|
||||
"when": "filesExplorerFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "shift+;",
|
||||
"command": "insertPrevSuggestion",
|
||||
"when": "hasOtherSuggestions && textInputFocus && textInputFocus && !inSnippetMode && !suggestWidgetVisible && config.editor.tabCompletion == 'on'"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+l",
|
||||
"when": "sideBarFocus",
|
||||
"command": "workbench.action.focusActiveEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k",
|
||||
"command": "workbench.action.focusActiveEditorGroup",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+t",
|
||||
"command": "workbench.action.terminal.focus",
|
||||
"when": "!terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "-editor.action.insertLineAfter",
|
||||
"when": "editorTextFocus && neovim.ctrlKeysInsert && !neovim.recording && neovim.mode == 'insert'"
|
||||
},
|
||||
{
|
||||
"key": "alt+j",
|
||||
"command": "workbench.action.terminal.focus",
|
||||
"when": "!terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+t",
|
||||
"command": "workbench.action.togglePanel"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "-workbench.action.togglePanel"
|
||||
},
|
||||
{
|
||||
"key": "shift+k",
|
||||
"command": "editor.action.showHover",
|
||||
"when": "editorTextFocus && neovim.mode != 'insert'"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+i",
|
||||
"command": "-editor.action.showHover",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "shift+tab",
|
||||
"command": "-acceptAlternativeSelectedSuggestion",
|
||||
"when": "suggestWidgetVisible && textInputFocus && textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+f",
|
||||
"command": "-vscode-neovim.ctrl-f",
|
||||
"when": "editorTextFocus && neovim.ctrlKeysNormal && neovim.init && neovim.mode != 'insert'"
|
||||
},
|
||||
{
|
||||
"key": "space",
|
||||
"command": "whichkey.show",
|
||||
"when": "neovim.mode != 'insert' && !inputFocus"
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue