feat: remove deprecated ts plugin
This commit is contained in:
parent
a1135381c6
commit
c936c64849
7 changed files with 8 additions and 78 deletions
|
@ -6,12 +6,11 @@
|
|||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"cosmic-ui": { "branch": "main", "commit": "c0b14531999f2bfef3d927c4dcd57a1a8fed5ee9" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
|
||||
"garbage-day.nvim": { "branch": "main", "commit": "cecb3b5672b61d970bb714cec781720c9ab76bbf" },
|
||||
"garbage-day.nvim": { "branch": "main", "commit": "b01adb94c77473e354642e97a5c7825037c16be5" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "0ccd5fb2316b3f8d8b2f775bc31cae7bc6a77a55" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
|
||||
|
@ -24,11 +23,10 @@
|
|||
"nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
|
||||
"nvim-lsp-ts-utils": { "branch": "main", "commit": "0a6a16ef292c9b61eac6dad00d52666c7f84b0e7" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "a4083b0e875866a04e866ee5bd2b00ede52e9cac" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "7384e7149e79365c96dc623d9fa3444737776982" },
|
||||
"nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "80cfeadf179d5cba76f0f502c71dbcff1b515cd8" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "557561fbc17269cdd4e9e88ef0ca1a9ff0bbf7e6" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "0df364926d39f59471ebc5ca83054d74e457350e" },
|
||||
"nvim-treesitter-refactor": { "branch": "master", "commit": "65ad2eca822dfaec2a3603119ec3cc8826a7859e" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "6c30f3c8915d7b31c3decdfe6c7672432da1809d" },
|
||||
|
|
|
@ -63,8 +63,6 @@ local config = {
|
|||
end,
|
||||
},
|
||||
},
|
||||
-- See Cosmic defaults lua/plugins/nvim-lsp-ts-utils/setup.lua
|
||||
ts_utils = {},
|
||||
},
|
||||
|
||||
-- adjust default plugin settings
|
||||
|
|
|
@ -68,11 +68,11 @@ end
|
|||
|
||||
M.capabilities = u.merge(capabilities, {
|
||||
-- See: https://github.com/neovim/neovim/issues/23291
|
||||
workspace = {
|
||||
didChangeWatchedFiles = {
|
||||
dynamicRegistration = false,
|
||||
},
|
||||
},
|
||||
--[[ workspace = { ]]
|
||||
--[[ didChangeWatchedFiles = { ]]
|
||||
--[[ dynamicRegistration = false, ]]
|
||||
--[[ }, ]]
|
||||
--[[ }, ]]
|
||||
})
|
||||
|
||||
M.root_dir = function(fname)
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
local default_on_attach = require('cosmic.lsp.providers.defaults').on_attach
|
||||
local M = {}
|
||||
|
||||
M.init_options = require('nvim-lsp-ts-utils').init_options
|
||||
|
||||
function M.on_attach(client, bufnr)
|
||||
default_on_attach(client, bufnr)
|
||||
|
||||
-- ts utils must be setup on "on_attach"
|
||||
require('cosmic.plugins.nvim-lsp-ts-utils.setup').setup(client)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
local user_config = require('cosmic.core.user')
|
||||
local utils = require('cosmic.utils')
|
||||
|
||||
return {
|
||||
'jose-elias-alvarez/nvim-lsp-ts-utils',
|
||||
init = function()
|
||||
user_config.lsp.add_on_attach_mapping(function(client, bufnr)
|
||||
if client.name == 'tsserver' then
|
||||
local buf_map = utils.create_buf_map(bufnr)
|
||||
-- typescript helpers
|
||||
buf_map('n', '<leader>lr', ':TSLspRenameFile<CR>', { desc = 'Rename file' })
|
||||
buf_map('n', '<leader>lo', ':TSLspOrganize<CR>', { desc = 'Organize imports' })
|
||||
buf_map('n', '<leader>li', ':TSLspImportAll<CR>', { desc = 'Import All' })
|
||||
end
|
||||
end)
|
||||
end,
|
||||
enabled = not vim.tbl_contains(user_config.disable_builtin_plugins, 'nvim-lsp-ts-utils'),
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
local u = require('cosmic.utils')
|
||||
local config = require('cosmic.core.user')
|
||||
local M = {}
|
||||
|
||||
M.setup = function(client)
|
||||
local ts_utils = require('nvim-lsp-ts-utils')
|
||||
|
||||
ts_utils.setup(u.merge({
|
||||
debug = false,
|
||||
disable_commands = false,
|
||||
enable_import_on_completion = true,
|
||||
|
||||
-- import all
|
||||
import_all_timeout = 5000, -- ms
|
||||
import_all_priorities = {
|
||||
buffers = 4, -- loaded buffer names
|
||||
buffer_content = 3, -- loaded buffer content
|
||||
local_files = 2, -- git files or files with relative path markers
|
||||
same_file = 1, -- add to existing import statement
|
||||
},
|
||||
import_all_scan_buffers = 100,
|
||||
import_all_select_source = false,
|
||||
|
||||
-- inlay hints
|
||||
auto_inlay_hints = true,
|
||||
inlay_hints_highlight = 'Comment',
|
||||
|
||||
-- update imports on file move
|
||||
update_imports_on_move = true,
|
||||
require_confirmation_on_move = false,
|
||||
watch_dir = nil,
|
||||
|
||||
-- filter diagnostics
|
||||
filter_out_diagnostics_by_severity = {},
|
||||
filter_out_diagnostics_by_code = {},
|
||||
}, config.lsp.ts_utils or {}))
|
||||
|
||||
-- required to fix code action ranges and filter diagnostics
|
||||
ts_utils.setup_client(client)
|
||||
end
|
||||
|
||||
return M
|
|
@ -41,7 +41,6 @@ Full featured native LSP functionality!
|
|||
- Floating terminal with [vim-floaterm](https://github.com/voldikss/vim-floaterm)
|
||||
- Auto LSP/formatter/linter installation via [mason.nvim](https://github.com/williamboman/mason.nvim)
|
||||
- Autocompletion via [nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
|
||||
- Additional TypeScript support via [nvim-lsp-ts-utils](https://github.com/jose-elias-alvarez/nvim-lsp-ts-utils)
|
||||
- Snippet support via [LuaSnip](https://github.com/L3MON4D3/LuaSnip)
|
||||
- Session management via [auto-session](https://github.com/rmagatti/auto-session)
|
||||
- Additional custom highlighting
|
||||
|
|
Loading…
Add table
Reference in a new issue