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
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
require("options")

View file

@ -306,10 +306,15 @@ function M.get()
-- treesitter position
components.active[1][14] = {
provider = function()
if not require("nvim-treesitter.parsers").has_parser() then
return ""
end
local pos = require("nvim-treesitter").statusline()
-- if not require("vim.treesitter.language").require_language("lua") then
-- return ""
-- end
local pos = require("nvim-treesitter").statusline({
indicator_size = 50,
transform_fn = function(line)
return line:gsub("%s*[%[%(%{]+.*$", "")
end,
})
if pos and pos ~= "" then
return pos
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,
}
require("neodev").setup()
local lspconfig = require("lspconfig")
local capabilities = require("cmp_nvim_lsp").default_capabilities()
@ -69,23 +71,6 @@ lspconfig.fortls.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,
flags = lsp_flags,
capabilities = capabilities,

View file

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