1
0
Fork 0

Compare commits

...

3 Commits

4 changed files with 76 additions and 51 deletions

View File

@ -6,6 +6,7 @@
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "1423254f58a3407a5afd5ade0ccd901f3eecc6ba" },
"mason.nvim": { "branch": "main", "commit": "e54f5bf5f12c560da31c17eee5b3e1bd369f3ff9" },
"none-ls.nvim": { "branch": "main", "commit": "241ff8214b4ec051eb51e74a61ff729c0271b429" },
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },

View File

@ -0,0 +1,74 @@
return {
"mason-org/mason-lspconfig.nvim",
opts = {},
dependencies = {
{ "mason-org/mason.nvim", opts = {} },
"neovim/nvim-lspconfig",
},
config = function()
require("mason-lspconfig").setup {
ensure_installed = {
"lua_ls",
"prettier",
"html",
"tailwindcss",
"eslint",
"ts_ls",
"emmet_ls",
"cssls"
},
}
vim.lsp.config("lua_ls", {
on_init = function(client)
if client.workspace_folders then
local path = client.workspace_folders[1].name
if vim.loop.fs_stat(path..'/.luarc.json') or vim.loop.fs_stat(path..'/.luarc.jsonc') then
return
end
end
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
runtime = {
version = 'LuaJIT'
},
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME
}
}
})
end,
settings = {
Lua = {}
}
})
vim.lsp.config("ts_ls", {
settings = {
typescript = {
inlayHints = {
includeInlayParameterNameHints = "none",
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayFunctionParameterTypeHints = false,
includeInlayEnumMemberValueHints = true,
},
},
javascript = {
inlayHints = {
includeInlayParameterNameHints = "none",
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayFunctionParameterTypeHints = false,
includeInlayEnumMemberValueHints = true,
},
},
},
})
vim.lsp.inlay_hint.enable(true)
end
}

View File

@ -1,50 +0,0 @@
return {
-- Packager Manager (LSPs)
'williamboman/mason.nvim',
config = function()
require("mason").setup()
vim.lsp.enable("lua_ls")
vim.lsp.config("lua_ls", {
on_init = function(client)
if client.workspace_folders then
local path = client.workspace_folders[1].name
if vim.loop.fs_stat(path..'/.luarc.json') or vim.loop.fs_stat(path..'/.luarc.jsonc') then
return
end
end
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
runtime = {
version = 'LuaJIT'
},
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME
}
}
})
end,
settings = {
Lua = {}
}
})
vim.lsp.enable("clangd")
vim.lsp.enable("rust_analyzer")
vim.lsp.enable("pyright")
vim.lsp.enable("html")
vim.lsp.enable("vtsls")
vim.lsp.enable("svelte")
vim.lsp.enable("tailwindcss")
vim.lsp.enable("jdtls")
end
}

View File

@ -23,7 +23,7 @@ vim.opt.listchars = { -- Characters to use for whitespace
vim.opt.tabstop = 4 -- Visual width of a tab
vim.opt.softtabstop = 4 -- Insert mode tab size
vim.opt.shiftwidth = 4 -- Shift / autoindent size
vim.opt.expandtab = true -- Tabs to spaces
vim.opt.expandtab = false -- Tabs to spaces NO NO NO
vim.opt.smartindent = true
-- Wrapping