mirror of
https://github.com/arkorty/Neolite.git
synced 2026-03-18 00:57:12 +00:00
Format the plugin configs
This commit is contained in:
BIN
blob/neolite.jpg
Normal file
BIN
blob/neolite.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 93 KiB |
@@ -3,11 +3,11 @@ vim.opt.termguicolors = true
|
||||
|
||||
local ok, bufferline = pcall(require, "bufferline")
|
||||
if not ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
bufferline.setup({
|
||||
options = {
|
||||
mode = "tabs", -- set to "buffers" to only show buffers instead
|
||||
},
|
||||
options = {
|
||||
mode = "tabs", -- set to "buffers" to only show buffers instead
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,130 +1,130 @@
|
||||
local colorscheme = "onedark"
|
||||
|
||||
if colorscheme == "onedark" then
|
||||
-- Onedark Default Configuration
|
||||
local ok, onedark = pcall(require, "onedark")
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
onedark.setup({
|
||||
-- Main options --
|
||||
style = "darker", -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
|
||||
transparent = false, -- Show/hide background
|
||||
term_colors = true, -- Change terminal color as per the selected theme style
|
||||
ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden
|
||||
cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
|
||||
-- toggle theme style ---
|
||||
toggle_style_key = nil, -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example '<leader>ts'
|
||||
toggle_style_list = { "dark", "darker", "cool", "deep", "warm", "warmer", "light" }, -- List of styles to toggle between
|
||||
-- Change code style ---
|
||||
-- Options are italic, bold, underline, none
|
||||
-- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold'
|
||||
code_style = {
|
||||
comments = "italic",
|
||||
keywords = "none",
|
||||
functions = "none",
|
||||
strings = "none",
|
||||
variables = "none",
|
||||
},
|
||||
-- Lualine options --
|
||||
lualine = {
|
||||
transparent = false, -- lualine center bar transparency
|
||||
},
|
||||
-- Custom Highlights --
|
||||
colors = {}, -- Override default colors
|
||||
highlights = {}, -- Override highlight groups
|
||||
-- Plugins Config --
|
||||
diagnostics = {
|
||||
darker = true, -- darker colors for diagnostic
|
||||
undercurl = true, -- use undercurl instead of underline for diagnostics
|
||||
background = true, -- use background color for virtual text
|
||||
},
|
||||
})
|
||||
-- Onedark Default Configuration
|
||||
local ok, onedark = pcall(require, "onedark")
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
onedark.setup({
|
||||
-- Main options --
|
||||
style = "darker", -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
|
||||
transparent = false, -- Show/hide background
|
||||
term_colors = true, -- Change terminal color as per the selected theme style
|
||||
ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden
|
||||
cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
|
||||
-- toggle theme style ---
|
||||
toggle_style_key = nil, -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example '<leader>ts'
|
||||
toggle_style_list = { "dark", "darker", "cool", "deep", "warm", "warmer", "light" }, -- List of styles to toggle between
|
||||
-- Change code style ---
|
||||
-- Options are italic, bold, underline, none
|
||||
-- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold'
|
||||
code_style = {
|
||||
comments = "italic",
|
||||
keywords = "none",
|
||||
functions = "none",
|
||||
strings = "none",
|
||||
variables = "none",
|
||||
},
|
||||
-- Lualine options --
|
||||
lualine = {
|
||||
transparent = false, -- lualine center bar transparency
|
||||
},
|
||||
-- Custom Highlights --
|
||||
colors = {}, -- Override default colors
|
||||
highlights = {}, -- Override highlight groups
|
||||
-- Plugins Config --
|
||||
diagnostics = {
|
||||
darker = true, -- darker colors for diagnostic
|
||||
undercurl = true, -- use undercurl instead of underline for diagnostics
|
||||
background = true, -- use background color for virtual text
|
||||
},
|
||||
})
|
||||
|
||||
-- Load One Dark
|
||||
onedark.load()
|
||||
-- Load One Dark
|
||||
onedark.load()
|
||||
end
|
||||
|
||||
if colorscheme == "catppuccin" then
|
||||
-- Catppuccin
|
||||
local ok, catppuccin = pcall(require, "catppuccin")
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
catppuccin.setup({
|
||||
flavour = "mocha", -- latte, frappe, macchiato, mocha
|
||||
background = {
|
||||
-- :h background
|
||||
light = "latte",
|
||||
dark = "mocha",
|
||||
},
|
||||
transparent_background = false,
|
||||
show_end_of_buffer = false, -- show the '~' characters after the end of buffers
|
||||
term_colors = false,
|
||||
dim_inactive = {
|
||||
enabled = false,
|
||||
shade = "dark",
|
||||
percentage = 0.15,
|
||||
},
|
||||
no_italic = false, -- Force no italic
|
||||
no_bold = false, -- Force no bold
|
||||
styles = {
|
||||
comments = { "italic" },
|
||||
conditionals = { "italic" },
|
||||
loops = {},
|
||||
functions = {},
|
||||
keywords = {},
|
||||
strings = {},
|
||||
variables = {},
|
||||
numbers = {},
|
||||
booleans = {},
|
||||
properties = {},
|
||||
types = {},
|
||||
operators = {},
|
||||
},
|
||||
color_overrides = {},
|
||||
custom_highlights = {},
|
||||
integrations = {
|
||||
cmp = true,
|
||||
gitsigns = true,
|
||||
nvimtree = true,
|
||||
telescope = true,
|
||||
notify = false,
|
||||
mini = false,
|
||||
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
|
||||
},
|
||||
})
|
||||
-- Catppuccin
|
||||
local ok, catppuccin = pcall(require, "catppuccin")
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
catppuccin.setup({
|
||||
flavour = "mocha", -- latte, frappe, macchiato, mocha
|
||||
background = {
|
||||
-- :h background
|
||||
light = "latte",
|
||||
dark = "mocha",
|
||||
},
|
||||
transparent_background = false,
|
||||
show_end_of_buffer = false, -- show the '~' characters after the end of buffers
|
||||
term_colors = false,
|
||||
dim_inactive = {
|
||||
enabled = false,
|
||||
shade = "dark",
|
||||
percentage = 0.15,
|
||||
},
|
||||
no_italic = false, -- Force no italic
|
||||
no_bold = false, -- Force no bold
|
||||
styles = {
|
||||
comments = { "italic" },
|
||||
conditionals = { "italic" },
|
||||
loops = {},
|
||||
functions = {},
|
||||
keywords = {},
|
||||
strings = {},
|
||||
variables = {},
|
||||
numbers = {},
|
||||
booleans = {},
|
||||
properties = {},
|
||||
types = {},
|
||||
operators = {},
|
||||
},
|
||||
color_overrides = {},
|
||||
custom_highlights = {},
|
||||
integrations = {
|
||||
cmp = true,
|
||||
gitsigns = true,
|
||||
nvimtree = true,
|
||||
telescope = true,
|
||||
notify = false,
|
||||
mini = false,
|
||||
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
|
||||
},
|
||||
})
|
||||
|
||||
-- Load Catppuccin
|
||||
catppuccin.load()
|
||||
-- Load Catppuccin
|
||||
catppuccin.load()
|
||||
end
|
||||
|
||||
if colorscheme == "gruvbox" then
|
||||
-- setup must be called before loading the colorscheme
|
||||
-- Default options:
|
||||
local ok, gruvbox = pcall(require, "gruvbox")
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
-- setup must be called before loading the colorscheme
|
||||
-- Default options:
|
||||
local ok, gruvbox = pcall(require, "gruvbox")
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
|
||||
gruvbox.setup({
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = true,
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
invert_intend_guides = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = {},
|
||||
overrides = {},
|
||||
dim_inactive = false,
|
||||
transparent_mode = false,
|
||||
})
|
||||
gruvbox.setup({
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = true,
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
invert_intend_guides = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = {},
|
||||
overrides = {},
|
||||
dim_inactive = false,
|
||||
transparent_mode = false,
|
||||
})
|
||||
|
||||
-- Load Gruvbox
|
||||
gruvbox.load()
|
||||
-- Load Gruvbox
|
||||
gruvbox.load()
|
||||
end
|
||||
|
||||
@@ -1,86 +1,86 @@
|
||||
local ok, cmp = pcall(require, "cmp")
|
||||
if not ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
local luasnip_ok, luasnip = pcall(require, "luasnip")
|
||||
if not luasnip_ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
local luasnip_vscode_ok, luasnip_vscode = pcall(require, "luasnip/loaders/from_vscode")
|
||||
if not luasnip_vscode_ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
luasnip_vscode.lazy_load()
|
||||
|
||||
cmp.setup({
|
||||
view = {
|
||||
--entries = { name = "custom", selection_order = "near_cursor" },
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body) -- For `luasnip` users.
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
||||
-- they way you will only jump inside the snippet region
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
},
|
||||
confirm_opts = {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false,
|
||||
},
|
||||
experimental = {
|
||||
ghost_text = false,
|
||||
},
|
||||
formatting = {
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
format = function(entry, vim_item)
|
||||
local lk_ok, lspkind = pcall(require, "lspkind")
|
||||
if not lk_ok then
|
||||
return
|
||||
end
|
||||
local kind = lspkind.cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, vim_item)
|
||||
local strings = vim.split(kind.kind, "%s", { trimempty = true })
|
||||
kind.kind = " " .. (strings[1] or "") .. " "
|
||||
kind.menu = " (" .. (strings[2] or "") .. ")"
|
||||
view = {
|
||||
--entries = { name = "custom", selection_order = "near_cursor" },
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body) -- For `luasnip` users.
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
||||
-- they way you will only jump inside the snippet region
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
},
|
||||
confirm_opts = {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false,
|
||||
},
|
||||
experimental = {
|
||||
ghost_text = false,
|
||||
},
|
||||
formatting = {
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
format = function(entry, vim_item)
|
||||
local lk_ok, lspkind = pcall(require, "lspkind")
|
||||
if not lk_ok then
|
||||
return
|
||||
end
|
||||
local kind = lspkind.cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, vim_item)
|
||||
local strings = vim.split(kind.kind, "%s", { trimempty = true })
|
||||
kind.kind = " " .. (strings[1] or "") .. " "
|
||||
kind.menu = " (" .. (strings[2] or "") .. ")"
|
||||
|
||||
return kind
|
||||
end,
|
||||
},
|
||||
return kind
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- disable netrw
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- set termguicolors to enable highlight groups
|
||||
|
||||
@@ -1,50 +1,50 @@
|
||||
local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig")
|
||||
if not lspconfig_status_ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
local mason_status_ok, mason = pcall(require, "mason")
|
||||
if not mason_status_ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
local mason_lspconfig_status_ok, mason_lspconfig = pcall(require, "mason-lspconfig")
|
||||
if not mason_lspconfig_status_ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
mason.setup({})
|
||||
|
||||
mason_lspconfig.setup({
|
||||
ensure_installed = { "lua_ls", "rust_analyzer", "clangd" },
|
||||
ensure_installed = { "lua_ls", "rust_analyzer", "clangd" },
|
||||
})
|
||||
|
||||
local cnl_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
|
||||
if not cnl_ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
|
||||
mason_lspconfig.setup_handlers({
|
||||
function(server)
|
||||
lspconfig[server].setup({ capabilities = capabilities })
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = { "vim" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
["rust_analyzer"] = function()
|
||||
local rt_ok, rust_tools = pcall(require, "rust-tools")
|
||||
if rt_ok then
|
||||
rust_tools.setup({})
|
||||
end
|
||||
end
|
||||
function(server)
|
||||
lspconfig[server].setup({ capabilities = capabilities })
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = { "vim" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
["rust_analyzer"] = function()
|
||||
local rt_ok, rust_tools = pcall(require, "rust-tools")
|
||||
if rt_ok then
|
||||
rust_tools.setup({})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
local ok, null_ls = pcall(require, "null-ls")
|
||||
if not ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
local formatting = null_ls.builtins.formatting
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
formatting.rustfmt,
|
||||
formatting.stylua,
|
||||
formatting.black,
|
||||
formatting.prettier,
|
||||
}, -- you can reuse a shared lspconfig on_attach callback here
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
-- on 0.8, you should use vim.lsp.buf.format({ bufnr = bufnr }) instead
|
||||
vim.lsp.buf.format({ bufnr = bufnr })
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
sources = {
|
||||
formatting.rustfmt,
|
||||
formatting.stylua,
|
||||
formatting.black,
|
||||
formatting.prettier,
|
||||
}, -- you can reuse a shared lspconfig on_attach callback here
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
-- on 0.8, you should use vim.lsp.buf.format({ bufnr = bufnr }) instead
|
||||
vim.lsp.buf.format({ bufnr = bufnr })
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
126
lua/plugins.lua
126
lua/plugins.lua
@@ -1,85 +1,85 @@
|
||||
local ok, packer = pcall(require, "packer")
|
||||
if not ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
packer.startup(function(use)
|
||||
-- Onedark colorscheme
|
||||
use({ "navarasu/onedark.nvim" })
|
||||
-- Onedark colorscheme
|
||||
use({ "navarasu/onedark.nvim" })
|
||||
|
||||
-- Gruvbox colorscheme
|
||||
use({ "ellisonleao/gruvbox.nvim" })
|
||||
-- Gruvbox colorscheme
|
||||
use({ "ellisonleao/gruvbox.nvim" })
|
||||
|
||||
-- Catppuccin colorscheme
|
||||
use({ "catppuccin/nvim", as = "catppuccin" })
|
||||
-- Catppuccin colorscheme
|
||||
use({ "catppuccin/nvim", as = "catppuccin" })
|
||||
|
||||
-- Plugin manager
|
||||
use({ "wbthomason/packer.nvim" })
|
||||
-- Plugin manager
|
||||
use({ "wbthomason/packer.nvim" })
|
||||
|
||||
-- Terminal
|
||||
use({ "akinsho/toggleterm.nvim", tag = "*" })
|
||||
-- Terminal
|
||||
use({ "akinsho/toggleterm.nvim", tag = "*" })
|
||||
|
||||
-- File tree
|
||||
use({
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
requires = {
|
||||
"nvim-tree/nvim-web-devicons", -- optional, for file icons
|
||||
},
|
||||
tag = "nightly", -- optional, updated every week. (see issue #1193)
|
||||
})
|
||||
-- File tree
|
||||
use({
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
requires = {
|
||||
"nvim-tree/nvim-web-devicons", -- optional, for file icons
|
||||
},
|
||||
tag = "nightly", -- optional, updated every week. (see issue #1193)
|
||||
})
|
||||
|
||||
-- Statusline
|
||||
use({
|
||||
"nvim-lualine/lualine.nvim",
|
||||
requires = { "kyazdani42/nvim-web-devicons", opt = true },
|
||||
})
|
||||
-- Statusline
|
||||
use({
|
||||
"nvim-lualine/lualine.nvim",
|
||||
requires = { "kyazdani42/nvim-web-devicons", opt = true },
|
||||
})
|
||||
|
||||
-- Buffer tabs
|
||||
use({ "akinsho/bufferline.nvim", tag = "v3.*", requires = "nvim-tree/nvim-web-devicons" })
|
||||
-- Buffer tabs
|
||||
use({ "akinsho/bufferline.nvim", tag = "v3.*", requires = "nvim-tree/nvim-web-devicons" })
|
||||
|
||||
use({
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.1",
|
||||
-- or , branch = '0.1.x',
|
||||
requires = { { "nvim-lua/plenary.nvim" } },
|
||||
})
|
||||
use({
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.1",
|
||||
-- or , branch = '0.1.x',
|
||||
requires = { { "nvim-lua/plenary.nvim" } },
|
||||
})
|
||||
|
||||
-- LSP manager
|
||||
use({ "williamboman/mason.nvim" })
|
||||
use({ "williamboman/mason-lspconfig.nvim" })
|
||||
use({ "neovim/nvim-lspconfig" })
|
||||
-- LSP manager
|
||||
use({ "williamboman/mason.nvim" })
|
||||
use({ "williamboman/mason-lspconfig.nvim" })
|
||||
use({ "neovim/nvim-lspconfig" })
|
||||
|
||||
use({ "jose-elias-alvarez/null-ls.nvim" })
|
||||
use({ "jose-elias-alvarez/null-ls.nvim" })
|
||||
|
||||
-- Completions
|
||||
use("hrsh7th/nvim-cmp") -- The completion plugin
|
||||
use("hrsh7th/cmp-buffer") -- buffer completions
|
||||
use("hrsh7th/cmp-path") -- path completions
|
||||
use("saadparwaiz1/cmp_luasnip") -- snippet completions
|
||||
-- Completions
|
||||
use("hrsh7th/nvim-cmp") -- The completion plugin
|
||||
use("hrsh7th/cmp-buffer") -- buffer completions
|
||||
use("hrsh7th/cmp-path") -- path completions
|
||||
use("saadparwaiz1/cmp_luasnip") -- snippet completions
|
||||
|
||||
use("onsails/lspkind.nvim")
|
||||
use("windwp/nvim-autopairs")
|
||||
use("hrsh7th/cmp-nvim-lsp")
|
||||
use("onsails/lspkind.nvim")
|
||||
use("windwp/nvim-autopairs")
|
||||
use("hrsh7th/cmp-nvim-lsp")
|
||||
|
||||
-- Snippets
|
||||
use("L3MON4D3/LuaSnip") --snippet engine
|
||||
use("rafamadriz/friendly-snippets") -- a bunch of snippets to use
|
||||
-- Snippets
|
||||
use("L3MON4D3/LuaSnip") --snippet engine
|
||||
use("rafamadriz/friendly-snippets") -- a bunch of snippets to use
|
||||
|
||||
use({
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
run = function()
|
||||
local ntsi_ok, nvim_treesitter_install = pcall(require, "nvim-treesitter.install")
|
||||
if ntsi_ok then
|
||||
local ts_update = nvim_treesitter_install.install.update({ with_sync = true })
|
||||
ts_update()
|
||||
end
|
||||
end,
|
||||
})
|
||||
use({
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
run = function()
|
||||
local ntsi_ok, nvim_treesitter_install = pcall(require, "nvim-treesitter.install")
|
||||
if ntsi_ok then
|
||||
local ts_update = nvim_treesitter_install.install.update({ with_sync = true })
|
||||
ts_update()
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
--use 'neovim/nvim-lspconfig'
|
||||
use 'simrat39/rust-tools.nvim'
|
||||
--use 'neovim/nvim-lspconfig'
|
||||
use("simrat39/rust-tools.nvim")
|
||||
|
||||
-- Debugging
|
||||
--use 'nvim-lua/plenary.nvim'
|
||||
use 'mfussenegger/nvim-dap'
|
||||
-- Debugging
|
||||
--use 'nvim-lua/plenary.nvim'
|
||||
use("mfussenegger/nvim-dap")
|
||||
end)
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
local ok, lualine = pcall(require, "lualine")
|
||||
if not ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
lualine.setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "auto",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
},
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch", "diff", "diagnostics" },
|
||||
lualine_c = { "filename" },
|
||||
lualine_x = { "encoding", "fileformat", "filetype" },
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { "filename" },
|
||||
lualine_x = { "location" },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {},
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "auto",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
},
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch", "diff", "diagnostics" },
|
||||
lualine_c = { "filename" },
|
||||
lualine_x = { "encoding", "fileformat", "filetype" },
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { "filename" },
|
||||
lualine_x = { "location" },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {},
|
||||
})
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
local ok, nvim_treesitter = pcall(require, "nvim-treesitter.configs")
|
||||
if not ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
nvim_treesitter.setup({
|
||||
-- A list of parser names, or "all" (the four listed parsers should always be installed)
|
||||
ensure_installed = { "c", "help", "lua", "vim", "cpp", "rust" },
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
-- List of parsers to ignore installing (for "all")
|
||||
ignore_install = { "javascript" },
|
||||
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
|
||||
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
|
||||
-- A list of parser names, or "all" (the four listed parsers should always be installed)
|
||||
ensure_installed = { "c", "help", "lua", "vim", "cpp", "rust" },
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
-- List of parsers to ignore installing (for "all")
|
||||
ignore_install = { "javascript" },
|
||||
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
|
||||
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
|
||||
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
|
||||
-- the name of the parser)
|
||||
-- list of language that will be disabled
|
||||
disable = { "" },
|
||||
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
|
||||
--disable = function(lang, buf)
|
||||
-- local max_filesize = 100 * 1024 -- 100 KB
|
||||
-- local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
-- if ok and stats and stats.size > max_filesize then
|
||||
-- return true
|
||||
-- end
|
||||
--end,
|
||||
highlight = {
|
||||
enable = true,
|
||||
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
|
||||
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
|
||||
-- the name of the parser)
|
||||
-- list of language that will be disabled
|
||||
disable = { "" },
|
||||
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
|
||||
--disable = function(lang, buf)
|
||||
-- local max_filesize = 100 * 1024 -- 100 KB
|
||||
-- local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
-- if ok and stats and stats.size > max_filesize then
|
||||
-- return true
|
||||
-- end
|
||||
--end,
|
||||
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = true,
|
||||
},
|
||||
indent = { enable = true, disable = { "yaml" } },
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = true,
|
||||
},
|
||||
indent = { enable = true, disable = { "yaml" } },
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user