mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
refactor(lsp): change capability name to snake case
This commit is contained in:
@@ -54,10 +54,9 @@ function M:new(bufnr)
|
|||||||
---@type vim.lsp.Capability
|
---@type vim.lsp.Capability
|
||||||
self = setmetatable({}, Class)
|
self = setmetatable({}, Class)
|
||||||
self.bufnr = bufnr
|
self.bufnr = bufnr
|
||||||
self.augroup = api.nvim_create_augroup(
|
self.augroup = api.nvim_create_augroup(string.format('nvim.lsp.%s:%s', self.name, bufnr), {
|
||||||
string.format('nvim.lsp.%s:%s', self.name:gsub('%s+', '_'):lower(), bufnr),
|
clear = true,
|
||||||
{ clear = true }
|
})
|
||||||
)
|
|
||||||
self.client_state = {}
|
self.client_state = {}
|
||||||
|
|
||||||
api.nvim_create_autocmd('LspDetach', {
|
api.nvim_create_autocmd('LspDetach', {
|
||||||
|
@@ -35,7 +35,7 @@ local Capability = require('vim.lsp._capability')
|
|||||||
---
|
---
|
||||||
--- Index in the form of start_row -> collapsed_text
|
--- Index in the form of start_row -> collapsed_text
|
||||||
---@field row_text table<integer, string?>
|
---@field row_text table<integer, string?>
|
||||||
local State = { name = 'Folding Range', active = {} }
|
local State = { name = 'folding_range', active = {} }
|
||||||
State.__index = State
|
State.__index = State
|
||||||
setmetatable(State, Capability)
|
setmetatable(State, Capability)
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@ local M = {}
|
|||||||
---@field debounce integer milliseconds to debounce requests for new tokens
|
---@field debounce integer milliseconds to debounce requests for new tokens
|
||||||
---@field timer table uv_timer for debouncing requests for new tokens
|
---@field timer table uv_timer for debouncing requests for new tokens
|
||||||
---@field client_state table<integer, STClientState>
|
---@field client_state table<integer, STClientState>
|
||||||
local STHighlighter = { name = 'Semantic Tokens', active = {} }
|
local STHighlighter = { name = 'semantic_tokens', active = {} }
|
||||||
STHighlighter.__index = STHighlighter
|
STHighlighter.__index = STHighlighter
|
||||||
setmetatable(STHighlighter, Capability)
|
setmetatable(STHighlighter, Capability)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user