fix: denols vs tsserver
This commit is contained in:
parent
9045d81df2
commit
1363b4f077
31
init.lua
31
init.lua
|
@ -43,6 +43,7 @@ P.S. You can delete this when you're done too. It's your config now :)
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
|
|
||||||
-- Install package manager
|
-- Install package manager
|
||||||
-- https://github.com/folke/lazy.nvim
|
-- https://github.com/folke/lazy.nvim
|
||||||
-- `:help lazy.nvim.txt` for more info
|
-- `:help lazy.nvim.txt` for more info
|
||||||
|
@ -478,14 +479,10 @@ require('which-key').register({
|
||||||
--
|
--
|
||||||
-- If you want to override the default filetypes that your language server will attach to you can
|
-- If you want to override the default filetypes that your language server will attach to you can
|
||||||
-- define the property 'filetypes' to the map in question.
|
-- define the property 'filetypes' to the map in question.
|
||||||
|
--
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
tsserver = {},
|
||||||
-- gopls = {},
|
denols = {},
|
||||||
-- pyright = {},
|
|
||||||
-- rust_analyzer = {},
|
|
||||||
-- tsserver = {},
|
|
||||||
-- html = { filetypes = { 'html', 'twig', 'hbs'} },
|
|
||||||
|
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
Lua = {
|
Lua = {
|
||||||
workspace = { checkThirdParty = false },
|
workspace = { checkThirdParty = false },
|
||||||
|
@ -519,6 +516,26 @@ mason_lspconfig.setup_handlers {
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local lspconfig = require 'lspconfig'
|
||||||
|
|
||||||
|
lspconfig.denols.setup({
|
||||||
|
root_dir = lspconfig.util.root_pattern("deno.json", "deno.jsonc"),
|
||||||
|
init_options = {
|
||||||
|
lint = true,
|
||||||
|
unstable = false
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig.tsserver.setup({
|
||||||
|
root_dir = lspconfig.util.root_pattern("package.json"),
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
-- Disable tsserver for deno projects
|
||||||
|
if lspconfig.util.root_pattern("deno.json", "deno.jsonc")(vim.fn.getcwd()) then
|
||||||
|
client.stop()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- [[ Configure nvim-cmp ]]
|
-- [[ Configure nvim-cmp ]]
|
||||||
-- See `:help cmp`
|
-- See `:help cmp`
|
||||||
local cmp = require 'cmp'
|
local cmp = require 'cmp'
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
"leap.nvim": { "branch": "main", "commit": "8f4d3ab9fe5c906c5745150191831c5ee0a427a0" },
|
"leap.nvim": { "branch": "main", "commit": "8f4d3ab9fe5c906c5745150191831c5ee0a427a0" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
|
||||||
|
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
|
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
|
||||||
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
|
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
|
||||||
"neogen": { "branch": "main", "commit": "6de0add4805165317ab7d3d36b5cef48b1b865f3" },
|
"neogen": { "branch": "main", "commit": "6de0add4805165317ab7d3d36b5cef48b1b865f3" },
|
||||||
|
@ -23,7 +24,7 @@
|
||||||
"nvim-base16.lua": { "branch": "master", "commit": "b336f40462b3ca1ad16a17c195b83731a2942d9a" },
|
"nvim-base16.lua": { "branch": "master", "commit": "b336f40462b3ca1ad16a17c195b83731a2942d9a" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
|
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "b972e7154bc94ab4ecdbb38c8edbccac36f83996" },
|
"nvim-lspconfig": { "branch": "master", "commit": "b972e7154bc94ab4ecdbb38c8edbccac36f83996" },
|
||||||
"nvim-reveal": { "branch": "main", "commit": "64f63fd5e19f1ebb9368c847a16e63b175c9a9a7" },
|
"nvim-reveal": { "branch": "main", "commit": "e6374179582c9905cf9ae75b288856838a03e500" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "298a9dd4f8a0d95b347a7ebd301849d8b0e3917e" },
|
"nvim-treesitter": { "branch": "master", "commit": "298a9dd4f8a0d95b347a7ebd301849d8b0e3917e" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3557e41418b4a6c5b85d5d64abe94c9c50fa9b14" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3557e41418b4a6c5b85d5d64abe94c9c50fa9b14" },
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
|
||||||
|
|
|
@ -151,23 +151,6 @@ return {
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
"jay-babu/mason-null-ls.nvim",
|
|
||||||
cond = false,
|
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
|
||||||
dependencies = {
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
"nvimtools/none-ls.nvim",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("mason-null-ls").setup({
|
|
||||||
ensure_installed = {},
|
|
||||||
automatic_installation = true,
|
|
||||||
automatic_setup = false,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
|
Loading…
Reference in New Issue