Fixed and Cleaned some of the bug that where found in my config
This commit is contained in:
@@ -1,91 +0,0 @@
|
||||
-- print('test')
|
||||
|
||||
local enabled_lsps = {
|
||||
"pyright",
|
||||
"tsserver",
|
||||
"clangd",
|
||||
"gopls",
|
||||
"rust_analyzer",
|
||||
"taplo",
|
||||
"graphql"
|
||||
}
|
||||
|
||||
return {
|
||||
-- "L3MON4D3/LuaSnip",
|
||||
-- {
|
||||
"hrsh7th/nvim-cmp",
|
||||
|
||||
event = 'InsertEnter',
|
||||
|
||||
dependencies = {
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'L3MON4D3/LuaSnip',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
},
|
||||
|
||||
config = function()
|
||||
local cmp = require'cmp'
|
||||
local ls = require('luasnip')
|
||||
|
||||
cmp.setup({
|
||||
snippets = {
|
||||
expand = function(args)
|
||||
ls.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
{ name = 'luasnip' },
|
||||
},
|
||||
})
|
||||
end,
|
||||
-- },
|
||||
-- 'saadparwaiz1/cmp_luasnip',
|
||||
|
||||
|
||||
-- config = function()
|
||||
--
|
||||
-- end,
|
||||
--
|
||||
-- config = function()
|
||||
-- local cmp = require('cmp')
|
||||
--
|
||||
-- cmp.setup({
|
||||
-- snippet = {
|
||||
-- expand = function(args)
|
||||
-- vim.fn["luasnip#anonymous"](args.body)
|
||||
-- end,
|
||||
-- },
|
||||
-- window = {
|
||||
-- completion = cmp.config.window.bordered(),
|
||||
-- documentation = cmp.config.window.bordered(),
|
||||
-- },
|
||||
-- mapping = cmp.mapping.preset.insert({
|
||||
-- ['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
-- ['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
-- ['<C-Space>'] = cmp.mapping.complete(),
|
||||
-- ['<C-y>'] = cmp.config.disable,
|
||||
-- ['<C-e>'] = cmp.mapping({
|
||||
-- i = cmp.mapping.abort(),
|
||||
-- c = cmp.mapping.close(),
|
||||
-- }),
|
||||
-- ['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
-- }),
|
||||
-- sources = cmp.config.sources({
|
||||
-- { name = 'nvim_lsp' },
|
||||
-- { name = 'luasnip' },
|
||||
-- }, {
|
||||
-- { name = 'buffer' },
|
||||
-- })
|
||||
-- })
|
||||
--
|
||||
-- end,
|
||||
--
|
||||
-- build = function()
|
||||
-- local lspconfig = require('lspconfig')
|
||||
-- for i, lsp in ipairs(enabled_lsps) do
|
||||
-- lspconfig[lsp].setup({
|
||||
-- capabilities = capabilities
|
||||
-- })
|
||||
-- end
|
||||
-- end,
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
-- lua/plugins/harpoon.lua
|
||||
-- print('harpoon.lua loaded')
|
||||
|
||||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
-- lua/plugins/indent-blankline.lua
|
||||
|
||||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
-- lua/plugins/lsp.lua
|
||||
-- print('lsp.lua loaded')
|
||||
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
lazy = false,
|
||||
priority = 900,
|
||||
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
},
|
||||
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
local mason = require("mason")
|
||||
local masonlsp = require("mason-lspconfig")
|
||||
|
||||
mason.setup()
|
||||
masonlsp.setup()
|
||||
-- lspconfig.setup({})
|
||||
|
||||
lspconfig.pyright.setup({})
|
||||
lspconfig.tsserver.setup({})
|
||||
lspconfig.clangd.setup({})
|
||||
lspconfig.gopls.setup({})
|
||||
lspconfig.rust_analyzer.setup({})
|
||||
lspconfig.taplo.setup({})
|
||||
lspconfig.graphql.setup({})
|
||||
lspconfig.lua_ls.setup({
|
||||
settings = {
|
||||
diagnostics = {
|
||||
global = {
|
||||
'vim',
|
||||
'require'
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
lspconfig.vimls.setup({})
|
||||
-- lspconfig.rust_analyzer.setup({})
|
||||
-- lspconfig.lua_ls.setup({})
|
||||
end,
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
-- lua/plugins/lualine.lua
|
||||
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
|
||||
config = function()
|
||||
local lualine = require('lualine')
|
||||
lualine.setup({
|
||||
options = {
|
||||
theme = 'auto',
|
||||
-- fmt = default,
|
||||
-- fmt = string.upper,
|
||||
|
||||
ignore_focus = {
|
||||
|
||||
},
|
||||
|
||||
refresh = {
|
||||
statusline = 100,
|
||||
tabline = 100,
|
||||
winbar = 100,
|
||||
},
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
-- {
|
||||
-- 'windows'
|
||||
-- },
|
||||
{
|
||||
'diff',
|
||||
colored = true,
|
||||
diff_color = {
|
||||
added = 'LuaLineDiffAdd',
|
||||
modified = 'LuaLineDiffChange',
|
||||
removed = 'LuaLineDiffDelete',
|
||||
},
|
||||
},
|
||||
-- {
|
||||
-- 'buffers',
|
||||
-- show_filename_only = true,
|
||||
-- show_modified_status = false,
|
||||
--
|
||||
-- mode = 4,
|
||||
--
|
||||
-- filetype_names = {
|
||||
-- NvimTree = 'NvimTree'
|
||||
-- },
|
||||
-- },
|
||||
{
|
||||
'mode',
|
||||
fmt = function(str) return '[' .. str:sub(1,1) .. ']' end,
|
||||
},
|
||||
},
|
||||
lualine_b = {
|
||||
{ 'branch' }
|
||||
},
|
||||
lualine_c = {
|
||||
{
|
||||
'filename',
|
||||
file_status = true,
|
||||
newfile_status = false,
|
||||
path = 0,
|
||||
fmt = string.lower,
|
||||
shorting_target = 40,
|
||||
|
||||
symbols = {
|
||||
modified = '[+]',
|
||||
readonly = '[-]',
|
||||
unamed = '[No Name]',
|
||||
newfile = '[New]',
|
||||
},
|
||||
}
|
||||
},
|
||||
lualine_x = {
|
||||
{
|
||||
require("lazy.status").updates,
|
||||
cond = require("lazy.status").has_updates,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
{
|
||||
'encoding'
|
||||
},
|
||||
{
|
||||
'filetype',
|
||||
colored = true,
|
||||
icons_enabled = true,
|
||||
icon_only = true,
|
||||
icon = { align='center' }
|
||||
}
|
||||
},
|
||||
lualine_y = {
|
||||
{
|
||||
'progress',
|
||||
},
|
||||
},
|
||||
lualine_z = {
|
||||
{
|
||||
'location',
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
-- lua/plugins/nvimtree.lua
|
||||
-- print('nvimtree.lua loaded')
|
||||
|
||||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
-- lua/plugin/oxocarbon.lua
|
||||
-- print('oxocarbon.lua loaded')
|
||||
|
||||
return {
|
||||
"nyoom-engineering/oxocarbon.nvim",
|
||||
"",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
vim.cmd.colorscheme('oxocarbon')
|
||||
end,
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
-- lua/plugins/telescope.lua
|
||||
-- print('telescope.lua loaded')
|
||||
|
||||
return {
|
||||
"nvim-telescope/telescope-file-browser.nvim",
|
||||
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-lua/plenary.nvim"
|
||||
},
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
-- lua/plugins/treesitter.lua
|
||||
-- print('treesitter.lua loaded')
|
||||
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
|
||||
build = ":TSUpdate",
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
-- lua/plugin/oxocarbon.lua
|
||||
-- print('oxocarbon.lua loaded')
|
||||
|
||||
return {
|
||||
{
|
||||
"nyoom-engineering/oxocarbon.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
'kepano/flexoki-neovim',
|
||||
name = 'flexoki',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
},
|
||||
|
||||
-- config = function()
|
||||
-- vim.cmd.colorscheme('oxocarbon')
|
||||
-- end,
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
local wk = require("which-key")
|
||||
wk.add({
|
||||
{ "<leader>sa", name "[S]urround [A]dd" },
|
||||
})
|
||||
end,
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
},
|
||||
}
|
||||
@@ -23,7 +23,7 @@ autocmd("TextYankPost", {
|
||||
group = yank_group,
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
vim.highlight.on_yank({
|
||||
vim.hl.on_yank({
|
||||
higroup = "IncSearch",
|
||||
timeout = 40,
|
||||
})
|
||||
|
||||
@@ -33,7 +33,7 @@ return {
|
||||
-- require("none-ls.diagnostics.eslint"),
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
if client:supports_method("textDocument/formatting") then
|
||||
-- vim.api.nvim_buf_set_option(bufnr, "formatexpr", "v:lua.vim.lsp.formatexpr()")
|
||||
vim.api.nvim_set_option_value("formatexpr", "v:lua.vim.lsp.formatexpr()", { buf = bufnr })
|
||||
end
|
||||
|
||||
@@ -33,11 +33,21 @@ return {
|
||||
|
||||
config = function()
|
||||
-- print("lsp.lua")
|
||||
local lspconfig = require("lspconfig")
|
||||
require("fidget").setup({})
|
||||
-- local lspconfig = require("lspconfig")
|
||||
-- local lspconfig = vim.lsp.config
|
||||
local lspconfig = vim.lsp.config
|
||||
require("fidget").setup({
|
||||
notification = {
|
||||
window = {
|
||||
avoid = {
|
||||
"NvimTree"
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig.gopls.setup({})
|
||||
lspconfig.lua_ls.setup({
|
||||
lspconfig.gopls = {}
|
||||
lspconfig.lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
@@ -59,7 +69,7 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
vim.diagnostic.config({
|
||||
-- virtual_text = false,
|
||||
@@ -76,7 +86,7 @@ return {
|
||||
focusable = true,
|
||||
style = "minimal",
|
||||
border = "rounded",
|
||||
source = "always",
|
||||
source = true,
|
||||
header = "",
|
||||
prefix = "",
|
||||
},
|
||||
|
||||
@@ -7,7 +7,8 @@ return {
|
||||
},
|
||||
config = function()
|
||||
-- print('mason.lua')
|
||||
local lspconfig = require("lspconfig")
|
||||
-- local lspconfig = require("lspconfig")
|
||||
local lspconfig = vim.lsp.config
|
||||
|
||||
local capabilities = vim.tbl_deep_extend(
|
||||
"force",
|
||||
@@ -19,18 +20,21 @@ return {
|
||||
require("mason").setup({})
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
-- "ts_ls",
|
||||
-- "gopls",
|
||||
"clangd",
|
||||
"rust_analyzer",
|
||||
-- "lua_ls",
|
||||
"lua_ls",
|
||||
"gopls",
|
||||
"ts_ls",
|
||||
-- "clangd",
|
||||
-- "rust_analyzer",
|
||||
-- "php"
|
||||
},
|
||||
handlers = {
|
||||
function(server_name) -- default handler (optional)
|
||||
require("lspconfig")[server_name].setup({
|
||||
vim.lsp.config(server_name, {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
-- require("lspconfig")[server_name].setup({
|
||||
-- capabilities = capabilities,
|
||||
-- })
|
||||
end,
|
||||
["ts_ls"] = function()
|
||||
-- local function organize_imports()
|
||||
@@ -41,7 +45,7 @@ return {
|
||||
-- }
|
||||
-- vim.lsp.buf.execute_command(params)
|
||||
-- end
|
||||
lspconfig.ts_ls.setup({
|
||||
lspconfig.ts_ls = {
|
||||
capabilities = capabilities,
|
||||
-- commands = {
|
||||
-- OrganizeImports = {
|
||||
@@ -49,37 +53,28 @@ return {
|
||||
-- description = "Organize Imports",
|
||||
-- },
|
||||
-- },
|
||||
})
|
||||
}
|
||||
end,
|
||||
-- ["lua_ls"] = function()
|
||||
-- local lspconfig = require("lspconfig")
|
||||
-- lspconfig.lua_ls.setup({
|
||||
-- capabilities = capabilities,
|
||||
-- settings = {
|
||||
-- Lua = {
|
||||
-- -- workspace = {
|
||||
-- -- checkThirdParty = false,
|
||||
-- -- library = vim.api.nvim_get_runtime_file("", true),
|
||||
-- -- },
|
||||
-- diagnostics = {
|
||||
-- globals = { "vim", "it", "describe", "before_each", "after_each" },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
|
||||
["clangd"] = function()
|
||||
-- local lspconfig = require("lspconfig")
|
||||
lspconfig.clangd.setup({
|
||||
["lua_ls"] = function()
|
||||
lspconfig.lua_ls = {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
settings = {
|
||||
Lua = {
|
||||
-- workspace = {
|
||||
-- checkThirdParty = false,
|
||||
-- library = vim.api.nvim_get_runtime_file("", true),
|
||||
-- },
|
||||
diagnostics = {
|
||||
globals = { "vim", "it", "describe", "before_each", "after_each" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
["gopls"] = function()
|
||||
-- local lspconfig = require("lspconfig")
|
||||
lspconfig.gopls.setup({
|
||||
lspconfig.gopls = {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
}
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@ return {
|
||||
version = false,
|
||||
config = function()
|
||||
local minis = require("mini.surround").setup()
|
||||
local wk = require('which-key')
|
||||
local wk = require("which-key")
|
||||
wk.add({
|
||||
{ "<leader>s", group = "Search/Mini Surround" },
|
||||
{ "<leader>sa", desc = "[S]urround [A]dd", mode = "n", group = "Mini Surround" },
|
||||
|
||||
@@ -54,8 +54,8 @@ return {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"c_sharp",
|
||||
"cpp",
|
||||
"go",
|
||||
"diff",
|
||||
"html",
|
||||
"javascript",
|
||||
@@ -67,17 +67,14 @@ return {
|
||||
"luap",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"php",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"rust",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"vue",
|
||||
"xml",
|
||||
"yaml",
|
||||
},
|
||||
|
||||
@@ -9,9 +9,9 @@ return {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
spec = {
|
||||
{ "<leader>sa", name = "[S]urround [A]dd" },
|
||||
}
|
||||
-- spec = {
|
||||
-- { "<leader>sa", name = "[S]urround [A]dd" },
|
||||
-- }
|
||||
},
|
||||
config = function(_, opts)
|
||||
local wk = require('which-key')
|
||||
|
||||
Reference in New Issue
Block a user