Add neodev plugin

This commit is contained in:
Evie Litherland-Smith 2023-02-17 16:29:48 +00:00
parent 9a30d3caaa
commit 65064e74f5
5 changed files with 26 additions and 23 deletions

View file

@ -12,7 +12,9 @@ if not vim.loop.fs_stat(lazypath) then
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
require("lazy").setup(require("plugins")) local plugins = require("plugins")
local opts = require("config.lazy")
require("lazy").setup(plugins, opts)
-- Set vim options -- Set vim options
require("options") require("options")

View file

@ -306,10 +306,15 @@ function M.get()
-- treesitter position -- treesitter position
components.active[1][14] = { components.active[1][14] = {
provider = function() provider = function()
if not require("nvim-treesitter.parsers").has_parser() then -- if not require("vim.treesitter.language").require_language("lua") then
return "" -- return ""
end -- end
local pos = require("nvim-treesitter").statusline() local pos = require("nvim-treesitter").statusline({
indicator_size = 50,
transform_fn = function(line)
return line:gsub("%s*[%[%(%{]+.*$", "")
end,
})
if pos and pos ~= "" then if pos and pos ~= "" then
return pos return pos
end end

View file

@ -0,0 +1,10 @@
local M = {
install = {
colorscheme = {
"catppuccin",
"habamax",
"default",
},
},
}
return M

View file

@ -53,6 +53,8 @@ local lsp_flags = {
debounce_text_changes = 150, debounce_text_changes = 150,
} }
require("neodev").setup()
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
local capabilities = require("cmp_nvim_lsp").default_capabilities() local capabilities = require("cmp_nvim_lsp").default_capabilities()
@ -69,23 +71,6 @@ lspconfig.fortls.setup({
}) })
lspconfig.lua_ls.setup({ lspconfig.lua_ls.setup({
settings = {
Lua = {
runtime = {
version = "LuaJIT",
},
diagnostics = {
globals = { "vim" },
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false,
},
telemetry = {
enable = false,
},
},
},
on_attach = on_attach, on_attach = on_attach,
flags = lsp_flags, flags = lsp_flags,
capabilities = capabilities, capabilities = capabilities,

View file

@ -9,7 +9,7 @@ local M = {
require("colours") require("colours")
end, end,
}, },
"stevearc/dressing.nvim", { "stevearc/dressing.nvim" },
{ {
"feline-nvim/feline.nvim", "feline-nvim/feline.nvim",
config = function() config = function()
@ -42,6 +42,7 @@ local M = {
{ "rafamadriz/friendly-snippets" }, { "rafamadriz/friendly-snippets" },
{ "windwp/nvim-autopairs" }, { "windwp/nvim-autopairs" },
{ "jose-elias-alvarez/null-ls.nvim" }, { "jose-elias-alvarez/null-ls.nvim" },
{ "folke/neodev.nvim" },
}, },
config = function() config = function()
require("config.lsp") require("config.lsp")