Compare commits

..

No commits in common. "4f0ea77e680b2e5eb95405a5bf9832c80e7cdc1d" and "d3c45857ebf66511e02aff9278c0d052ae5eb66b" have entirely different histories.

14 changed files with 55 additions and 136 deletions

View File

@ -1,11 +1,3 @@
local lsp_capabilities = require("cmp_nvim_lsp").default_capabilities()
local default_setup = function(server)
require("lspconfig")[server].setup({
capabilities = lsp_capabilities,
})
end
-- enable mason and configure icons
require("mason").setup({
ui = {
@ -17,75 +9,43 @@ require("mason").setup({
},
})
require("mason-lspconfig").setup({
ensure_installed = {},
handlers = {
default_setup,
-- lua_ls = function()
-- require("lspconfig").eslint.setup({
-- capabilities = lsp_capabilities,
-- args = {
-- "--no-warn-ignored", -- <-- this is the key argument
-- "--format",
-- "json",
-- "--stdin",
-- "--stdin-filename",
-- function()
-- return vim.api.nvim_buf_get_name(0)
-- end,
-- },
-- })
-- end,
require("mason-tool-installer").setup({
ensure_installed = {
"prettier", -- prettier formatter
-- "stylua", -- lua formatter
"isort", -- python formatter
"black", -- python formatter
"pylint", -- python linter
"eslint_d", -- js linter
},
})
--#################################################################################
--##### THESE ARE THE LANGUAGE SERVERS WE WANT
--#################################################################################
local lsps_for_install = { "eslint", "html", "cssls", "bashls", "grammarly" }
--make this table 2d to add configs
local mason_lspconfig = require("mason-lspconfig")
mason_lspconfig.setup {
ensure_installed = lsps_for_install
}
local cmp = require("cmp")
local lspconfig = require("lspconfig")
local lsp_capabilities = require("cmp_nvim_lsp").default_capabilities()
for _, lsp in pairs(lsps_for_install) do
lspconfig[lsp].setup {
capabilities = lsp_capabilities,
}
end
cmp.setup({
sources = {
{ name = "nvim_lsp" },
lspconfig.lua_ls.setup {
capabilities = lsp_capabilities,
settings = {
Lua = {
diagnostics = {
globals = { "vim" },
},
},
},
mapping = cmp.mapping.preset.insert({
-- Enter key confirms completion item
["<CR>"] = cmp.mapping.confirm({ select = false }),
-- Ctrl + space triggers completion menu
["<C-Space>"] = cmp.mapping.complete(),
}),
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
})
-- local lsps_for_install = { --[[ "eslint", ]]
-- "html",
-- "cssls",
-- "bashls",
-- "grammarly",
-- }
-- --make this table 2d to add configs
-- local mason_lspconfig = require("mason-lspconfig")
-- mason_lspconfig.setup({
-- ensure_installed = lsps_for_install,
-- })
--
-- local lspconfig = require("lspconfig")
-- local lsp_capabilities = require("cmp_nvim_lsp").default_capabilities()
-- for _, lsp in pairs(lsps_for_install) do
-- lspconfig[lsp].setup({
-- capabilities = lsp_capabilities,
-- })
-- end
--
-- lspconfig.lua_ls.setup({
-- capabilities = lsp_capabilities,
-- settings = {
-- Lua = {
-- diagnostics = {
-- globals = { "vim" },
-- },
-- },
-- },
-- })
}

View File

@ -5,42 +5,17 @@ return {
"BufReadPre",
"BufNewFile",
},
config = function()
require("mason-tool-installer").setup({
ensure_installed = {
"prettier", -- prettier formatter
-- "stylua", -- lua formatter
"isort", -- python formatter
"black", -- python formatter
"pylint", -- python linter
"biome", -- js linter
},
})
local lint = require("lint")
lint.linters_by_ft = {
javascript = { "biomejs" },
typescript = { "biomejs" },
javascriptreact = { "biomejs" },
typescriptreact = { "biomejs" },
svelte = { "biomejs" },
javascript = { "eslint_d" },
typescript = { "eslint_d" },
javascriptreact = { "eslint_d" },
typescriptreact = { "eslint_d" },
svelte = { "eslint_d" },
python = { "pylint" },
markdown = { "proselint" },
}
--###### ESLINT HACK ######
local eslint = lint.linters.eslint_d
eslint.args = {
"--no-warn-ignored", -- <-- this is the key argument
"--format",
"json",
"--stdin",
"--stdin-filename",
function()
return vim.api.nvim_buf_get_name(0)
end,
}
--##### END ESLINT HACK ######
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
@ -63,7 +38,7 @@ return {
"WhoIsSethDaniel/toggle-lsp-diagnostics.nvim",
config = function()
require("toggle_lsp_diagnostics").init({
start_on = true,
start_on = false,
})
end,
},

View File

@ -1,21 +1,9 @@
return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
},
config = function()
require("neo-tree").setup({
filesystem = {
filtered_items = {
visible = true, -- This is what you want: If you set this to `true`, all "hide" just mean "dimmed out"
hide_dotfiles = false,
hide_gitignored = true,
},
},
})
end,
}
return {"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
}
}

View File

@ -1,8 +0,0 @@
{
//"env": {
// "browser": true,
// "commonjs": true,
// "es6": true
//},
"extends": ["standard", "standard-react"]
}

View File

View File

@ -1,3 +1,5 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>HTML 5 Boilerplate</title>

View File

@ -1 +1,3 @@
function name() {}
function(){
}