mirror of
https://github.com/sadan4/nvim.git
synced 2025-01-18 03:03:29 -05:00
sofar
This commit is contained in:
parent
6150a083bd
commit
a4ea9fd451
13 changed files with 4 additions and 679 deletions
123
lua/plugins.lua
123
lua/plugins.lua
|
@ -1,27 +1,5 @@
|
|||
local plugins = {
|
||||
{
|
||||
"marcussimonsen/let-it-snow.nvim",
|
||||
cmd = "LetItSnow", -- Wait with loading until command is run
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
},
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua", -- only load on lua files
|
||||
init = function()
|
||||
vim.g.lazydev_enabled = true
|
||||
end,
|
||||
opts = {
|
||||
library = {
|
||||
-- See the configuration section for more details
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = "luvit-meta/library", words = { "vim%.uv" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
{ "Bilal2453/luvit-meta", lazy = true }, -- optional `vim.uv` typings
|
||||
|
||||
-- { -- optional blink completion source for require statements and module annotations
|
||||
-- "saghen/blink.cmp",
|
||||
-- opts = {
|
||||
|
@ -38,10 +16,7 @@ local plugins = {
|
|||
-- },
|
||||
-- },
|
||||
-- },
|
||||
{
|
||||
"echasnovski/mini.bufremove",
|
||||
version = "*",
|
||||
},
|
||||
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
|
@ -76,11 +51,6 @@ local plugins = {
|
|||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
version = "*",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
{
|
||||
"akinsho/toggleterm.nvim",
|
||||
},
|
||||
|
@ -117,15 +87,9 @@ local plugins = {
|
|||
{
|
||||
"olrtg/nvim-emmet",
|
||||
},
|
||||
{
|
||||
"lambdalisue/suda.vim",
|
||||
},
|
||||
{
|
||||
"sadan4/eregex.vim",
|
||||
},
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
},
|
||||
{
|
||||
"barrett-ruth/live-server.nvim",
|
||||
build = "pnpm add -g live-server",
|
||||
|
@ -144,9 +108,6 @@ local plugins = {
|
|||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
},
|
||||
{
|
||||
"andweeb/presence.nvim",
|
||||
},
|
||||
{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
},
|
||||
|
@ -165,66 +126,9 @@ local plugins = {
|
|||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
|
||||
{
|
||||
"p00f/clangd_extensions.nvim",
|
||||
},
|
||||
{
|
||||
"abecodes/tabout.nvim",
|
||||
lazy = false,
|
||||
requires = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"hrsh7th/nvim-cmp",
|
||||
},
|
||||
event = "InsertCharPre", -- Set the event to 'InsertCharPre' for better compatibility
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
opts = {
|
||||
-- add any options here
|
||||
},
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
config = true,
|
||||
-- use opts = {} for passing setup options
|
||||
-- this is equalent to setup({}) function
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"mhartington/formatter.nvim",
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.5",
|
||||
opts = {
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true, -- false will only do exact matching
|
||||
override_generic_sorter = true, -- override the generic sorter
|
||||
override_file_sorter = true, -- override the file sorter
|
||||
case_mode = "ignore_case", -- or "ignore_case" or "respect_case" or smart_case
|
||||
-- the default case_mode is "smart_case"
|
||||
},
|
||||
},
|
||||
},
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
{
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
},
|
||||
|
@ -241,29 +145,6 @@ local plugins = {
|
|||
{
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
},
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
},
|
||||
{
|
||||
"kevinhwang91/nvim-ufo",
|
||||
dependencies = {
|
||||
"kevinhwang91/promise-async",
|
||||
{
|
||||
"luukvbaal/statuscol.nvim",
|
||||
config = function()
|
||||
local builtin = require("statuscol.builtin")
|
||||
require("statuscol").setup({
|
||||
relculright = true,
|
||||
segments = {
|
||||
{ text = { builtin.foldfunc }, click = "v:lua.ScFa" },
|
||||
{ text = { "%s" }, click = "v:lua.ScSa" },
|
||||
{ text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
--{
|
||||
-- 'mfussenegger/nvim-lint'
|
||||
--},
|
||||
|
|
18
lua/sets.lua
18
lua/sets.lua
|
@ -1,19 +1,5 @@
|
|||
vim.opt.rnu = true
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.smarttab = true
|
||||
vim.opt.shiftround = true
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.scrolloff = 6
|
||||
vim.opt.sloc = "statusline"
|
||||
-- move to noice?
|
||||
-- vim.opt.sloc = "statusline"
|
||||
-- eregex.vim
|
||||
vim.g.eregex_default_enable = 1
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
||||
|
||||
callback = function()
|
||||
package.loaded.presence:update()
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -1,34 +1,17 @@
|
|||
require("themesetup")
|
||||
vim.cmd([[colorscheme tokyonight]])
|
||||
require("setupnotify")
|
||||
require("setupnoice")
|
||||
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup()
|
||||
|
||||
require("masonDownload")
|
||||
|
||||
require("setuplsp")
|
||||
|
||||
require("setupformat")
|
||||
|
||||
require("setuptree")
|
||||
require("setuptreesitter")
|
||||
-- Has to be setup after treesitter
|
||||
require("setuptabout")
|
||||
|
||||
require("setupufo")
|
||||
|
||||
require("setupcomment")
|
||||
-- setup function signature
|
||||
require("setupsig")
|
||||
|
||||
require("setuplualine")
|
||||
|
||||
require("setupDiscord")
|
||||
require('telescope').load_extension('fzf')
|
||||
require('telescope').load_extension("noice")
|
||||
require("setupbufferline")
|
||||
require("setupterminal")
|
||||
require("setuphover")
|
||||
require("colorizer").setup()
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
-- The setup config table shows all available config options with their default values:
|
||||
require("presence").setup({
|
||||
-- General options
|
||||
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
|
||||
neovim_image_text = "A text editor of all time", -- Text displayed when hovered over the Neovim image
|
||||
main_image = "neovim", -- Main image display (either "neovim" or "file")
|
||||
client_id = "793271441293967371", -- Use your own Discord application client id (not recommended)
|
||||
log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
|
||||
debounce_timeout = 5, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
|
||||
enable_line_number = true, -- Displays the current line number instead of the current project
|
||||
blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
|
||||
buttons = {
|
||||
{
|
||||
label = "Git",
|
||||
url = "https://github.com/sadan4",
|
||||
},
|
||||
{
|
||||
label = "My website",
|
||||
url = "https://sadan.zip",
|
||||
},
|
||||
}, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "<label>", url = "<url>" }, ...}`, or a function(buffer: string, repo_url: string|nil): table)
|
||||
file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference)
|
||||
show_time = true, -- Show the timer
|
||||
|
||||
-- Rich Presence text options
|
||||
editing_text = "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
|
||||
file_explorer_text = "Browsing %s", -- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
|
||||
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
|
||||
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
|
||||
reading_text = "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
|
||||
workspace_text = "Working on %s", -- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
|
||||
line_number_text = "Line %s out of %s", -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
|
||||
})
|
|
@ -1,192 +0,0 @@
|
|||
vim.opt.termguicolors = true
|
||||
-- test
|
||||
local function get_listed_bufs()
|
||||
return vim.tbl_filter(function(bufnr)
|
||||
return vim.api.nvim_buf_get_option(bufnr, "buflisted")
|
||||
end, vim.api.nvim_list_bufs())
|
||||
end
|
||||
-- print(vim.inspect(get_listed_bufs()))
|
||||
local function close_empty_unnamed_buffers()
|
||||
-- Get a list of all buffers
|
||||
local buffers = vim.api.nvim_list_bufs()
|
||||
local total = table.getn(get_listed_bufs())
|
||||
local soFar = 0
|
||||
-- Iterate over each buffer
|
||||
for _, bufnr in ipairs(buffers) do
|
||||
-- Check i f the buffer is empty and doesn't have a name
|
||||
if
|
||||
vim.api.nvim_buf_is_loaded(bufnr)
|
||||
and vim.api.nvim_buf_get_name(bufnr) == ""
|
||||
and vim.api.nvim_buf_get_option(bufnr, "buftype") == ""
|
||||
then
|
||||
-- Get all lines in the buffer
|
||||
local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
|
||||
|
||||
-- Initialize a variable to store the total number of characters
|
||||
local total_characters = 0
|
||||
|
||||
-- Iterate over each line and calculate the number of characters
|
||||
for _, line in ipairs(lines) do
|
||||
total_characters = total_characters + #line
|
||||
if total_characters ~= 0 then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
-- Close the buffer i f it's empty:
|
||||
if total_characters == 0 then
|
||||
soFar = soFar + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
if soFar == total then
|
||||
vim.cmd("quit")
|
||||
end
|
||||
end
|
||||
local close = function()
|
||||
local bd = require("mini.bufremove").delete
|
||||
if vim.bo.modified then
|
||||
local choice = vim.fn.confirm(("Save changes to %q?"):format(vim.fn.bufname()), "&Yes\n&No\n&Cancel")
|
||||
if choice == 1 then -- Yes
|
||||
vim.cmd.write()
|
||||
bd(0)
|
||||
elseif choice == 2 then -- No
|
||||
bd(0, true)
|
||||
end
|
||||
else
|
||||
bd(0)
|
||||
end
|
||||
close_empty_unnamed_buffers()
|
||||
end
|
||||
vim.o.confirm = true
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
group = vim.api.nvim_create_augroup("NvimTreeClose", { clear = true }),
|
||||
callback = function()
|
||||
local layout = vim.api.nvim_call_function("winlayout", {})
|
||||
if
|
||||
layout[1] == "leaf"
|
||||
and vim.api.nvim_buf_get_option(vim.api.nvim_win_get_buf(layout[2]), "filetype") == "NvimTree"
|
||||
and layout[3] == nil
|
||||
then
|
||||
vim.cmd("quit")
|
||||
end
|
||||
end,
|
||||
})
|
||||
require("bufferline").setup({
|
||||
options = {
|
||||
mode = "buffers",
|
||||
numbers = "buffer_id",
|
||||
close_command = close,
|
||||
right_mouse_command = close,
|
||||
indicator = {
|
||||
-- icon = "| ",
|
||||
style = "icon",
|
||||
},
|
||||
color_icons = true, -- whether or not to add the filetype icon highlights
|
||||
},
|
||||
})
|
||||
-- {
|
||||
-- options = {
|
||||
-- mode = "buffers", -- set to "tabs" to only show tabpages instead
|
||||
-- style_preset = bufferline.style_preset.default, -- or bufferline.style_preset.minimal,
|
||||
-- themable = true | false, -- allows highlight groups to be overriden i.e. sets highlights as default
|
||||
-- numbers = "none" | "ordinal" | "buffer_id" | "both" | function({ ordinal, id, lower, raise }): string,
|
||||
-- close_command = "bdelete! %d", -- can be a string | function, | false see "Mouse actions"
|
||||
-- right_mouse_command = "bdelete! %d", -- can be a string | function | false, see "Mouse actions"
|
||||
-- left_mouse_command = "buffer %d", -- can be a string | function, | false see "Mouse actions"
|
||||
-- middle_mouse_command = nil, -- can be a string | function, | false see "Mouse actions"
|
||||
-- indicator = {
|
||||
-- icon = '▎', -- this should be omitted if indicator style is not 'icon'
|
||||
-- style = 'icon' | 'underline' | 'none',
|
||||
-- },
|
||||
-- buffer_close_icon = '',
|
||||
-- modified_icon = '●',
|
||||
-- close_icon = '',
|
||||
-- left_trunc_marker = '',
|
||||
-- right_trunc_marker = '',
|
||||
-- --- name_formatter can be used to change the buffer's label in the bufferline.
|
||||
-- --- Please note some names can/will break the
|
||||
-- --- bufferline so use this at your discretion knowing that it has
|
||||
-- --- some limitations that will *NOT* be fixed.
|
||||
-- name_formatter = function(buf) -- buf contains:
|
||||
-- -- name | str | the basename of the active file
|
||||
-- -- path | str | the full path of the active file
|
||||
-- -- bufnr (buffer only) | int | the number of the active buffer
|
||||
-- -- buffers (tabs only) | table(int) | the numbers of the buffers in the tab
|
||||
-- -- tabnr (tabs only) | int | the "handle" of the tab, can be converted to its ordinal number using: `vim.api.nvim_tabpage_get_number(buf.tabnr)`
|
||||
-- end,
|
||||
-- max_name_length = 18,
|
||||
-- max_prefix_length = 15, -- prefix used when a buffer is de-duplicated
|
||||
-- truncate_names = true, -- whether or not tab names should be truncated
|
||||
-- tab_size = 18,
|
||||
-- diagnostics = false | "nvim_lsp" | "coc",
|
||||
-- diagnostics_update_in_insert = false,
|
||||
-- -- The diagnostics indicator can be set to nil to keep the buffer name highlight but delete the highlighting
|
||||
-- diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
-- return "("..count..")"
|
||||
-- end,
|
||||
-- -- NOTE: this will be called a lot so don't do any heavy processing here
|
||||
-- custom_filter = function(buf_number, buf_numbers)
|
||||
-- -- filter out filetypes you don't want to see
|
||||
-- if vim.bo[buf_number].filetype ~= "<i-dont-want-to-see-this>" then
|
||||
-- return true
|
||||
-- end
|
||||
-- -- filter out by buffer name
|
||||
-- if vim.fn.bufname(buf_number) ~= "<buffer-name-I-dont-want>" then
|
||||
-- return true
|
||||
-- end
|
||||
-- -- filter out based on arbitrary rules
|
||||
-- -- e.g. filter out vim wiki buffer from tabline in your work repo
|
||||
-- if vim.fn.getcwd() == "<work-repo>" and vim.bo[buf_number].filetype ~= "wiki" then
|
||||
-- return true
|
||||
-- end
|
||||
-- -- filter out by it's index number in list (don't show first buffer)
|
||||
-- if buf_numbers[1] ~= buf_number then
|
||||
-- return true
|
||||
-- end
|
||||
-- end,
|
||||
-- offsets = {
|
||||
-- {
|
||||
-- filetype = "NvimTree",
|
||||
-- text = "File Explorer" | function ,
|
||||
-- text_align = "left" | "center" | "right"
|
||||
-- separator = true
|
||||
-- }
|
||||
-- },
|
||||
-- color_icons = true | false, -- whether or not to add the filetype icon highlights
|
||||
-- get_element_icon = function(element)
|
||||
-- -- element consists of {filetype: string, path: string, extension: string, directory: string}
|
||||
-- -- This can be used to change how bufferline fetches the icon
|
||||
-- -- for an element e.g. a buffer or a tab.
|
||||
-- -- e.g.
|
||||
-- local icon, hl = require('nvim-web-devicons').get_icon_by_filetype(element.filetype, { default = false })
|
||||
-- return icon, hl
|
||||
-- -- or
|
||||
-- local custom_map = {my_thing_ft: {icon = "my_thing_icon", hl}}
|
||||
-- return custom_map[element.filetype]
|
||||
-- end,
|
||||
-- show_buffer_icons = true | false, -- disable filetype icons for buffers
|
||||
-- show_buffer_close_icons = true | false,
|
||||
-- show_close_icon = true | false,
|
||||
-- show_tab_indicators = true | false,
|
||||
-- show_duplicate_prefix = true | false, -- whether to show duplicate buffer prefix
|
||||
-- duplicates_across_groups = true, -- whether to consider duplicate paths in different groups as duplicates
|
||||
-- persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
|
||||
-- move_wraps_at_ends = false, -- whether or not the move command "wraps" at the first or last position
|
||||
-- -- can also be a table containing 2 custom separators
|
||||
-- -- [focused and unfocused]. eg: { '|', '|' }
|
||||
-- separator_style = "slant" | "slope" | "thick" | "thin" | { 'any', 'any' },
|
||||
-- enforce_regular_tabs = false | true,
|
||||
-- always_show_bufferline = true | false,
|
||||
-- auto_toggle_bufferline = true | false,
|
||||
-- hover = {
|
||||
-- enabled = true,
|
||||
-- delay = 200,
|
||||
-- reveal = {'close'}
|
||||
-- },
|
||||
-- sort_by = 'insert_after_current' |'insert_at_end' | 'id' | 'extension' | 'relative_directory' | 'directory' | 'tabs' | function(buffer_a, buffer_b)
|
||||
-- -- add custom logic
|
||||
-- return buffer_a.modified > buffer_b.modified
|
||||
-- end
|
||||
-- }
|
||||
-- }
|
|
@ -1,82 +0,0 @@
|
|||
require("clangd_extensions").setup({
|
||||
inlay_hints = {
|
||||
inline = vim.fn.has("nvim-0.10") == 1,
|
||||
-- Options other than `highlight' and `priority' only work
|
||||
-- if `inline' is disabled
|
||||
-- Only show inlay hints for the current line
|
||||
only_current_line = false,
|
||||
-- Event which triggers a refresh of the inlay hints.
|
||||
-- You can make this { "CursorMoved" } or { "CursorMoved,CursorMovedI" } but
|
||||
-- not that this may cause higher CPU usage.
|
||||
-- This option is only respected when only_current_line and
|
||||
-- autoSetHints both are true.
|
||||
only_current_line_autocmd = { "CursorHold" },
|
||||
-- whether to show parameter hints with the inlay hints or not
|
||||
show_parameter_hints = true,
|
||||
-- prefix for parameter hints
|
||||
parameter_hints_prefix = "<- ",
|
||||
-- prefix for all the other hints (type, chaining)
|
||||
other_hints_prefix = "=> ",
|
||||
-- whether to align to the length of the longest line in the file
|
||||
max_len_align = false,
|
||||
-- padding from the left if max_len_align is true
|
||||
max_len_align_padding = 1,
|
||||
-- whether to align to the extreme right or not
|
||||
right_align = false,
|
||||
-- padding from the right if right_align is true
|
||||
right_align_padding = 7,
|
||||
-- The color of the hints
|
||||
highlight = "Comment",
|
||||
-- The highlight group priority for extmark
|
||||
priority = 100,
|
||||
},
|
||||
ast = {
|
||||
-- These are unicode, should be available in any font
|
||||
role_icons = {
|
||||
type = "🄣",
|
||||
declaration = "🄓",
|
||||
expression = "🄔",
|
||||
statement = ";",
|
||||
specifier = "🄢",
|
||||
["template argument"] = "🆃",
|
||||
},
|
||||
kind_icons = {
|
||||
Compound = "🄲",
|
||||
Recovery = "🅁",
|
||||
TranslationUnit = "🅄",
|
||||
PackExpansion = "🄿",
|
||||
TemplateTypeParm = "🅃",
|
||||
TemplateTemplateParm = "🅃",
|
||||
TemplateParamObject = "🅃",
|
||||
},
|
||||
--[[ These require codicons (https://github.com/microsoft/vscode-codicons)
|
||||
role_icons = {
|
||||
type = "",
|
||||
declaration = "",
|
||||
expression = "",
|
||||
specifier = "",
|
||||
statement = "",
|
||||
["template argument"] = "",
|
||||
},
|
||||
|
||||
kind_icons = {
|
||||
Compound = "",
|
||||
Recovery = "",
|
||||
TranslationUnit = "",
|
||||
PackExpansion = "",
|
||||
TemplateTypeParm = "",
|
||||
TemplateTemplateParm = "",
|
||||
TemplateParamObject = "",
|
||||
}, ]]
|
||||
|
||||
highlights = {
|
||||
detail = "Comment",
|
||||
},
|
||||
},
|
||||
memory_usage = {
|
||||
border = "none",
|
||||
},
|
||||
symbol_info = {
|
||||
border = "none",
|
||||
},
|
||||
})
|
|
@ -1,8 +0,0 @@
|
|||
require("Comment").setup({
|
||||
toggler = {
|
||||
line = "<C-/>",
|
||||
},
|
||||
opleader = {
|
||||
line = "<C-/>",
|
||||
},
|
||||
})
|
|
@ -1,47 +0,0 @@
|
|||
require("lualine").setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "tokyonight",
|
||||
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 = {
|
||||
"%S",
|
||||
"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,64 +0,0 @@
|
|||
require("toggleterm").setup({
|
||||
-- size can be a number or function which is passed the current terminal
|
||||
-- size = 20 | function(term)
|
||||
-- if term.direction == "horizontal" then
|
||||
-- return 15
|
||||
-- elseif term.direction == "vertical" then
|
||||
-- return vim.o.columns * 0.4
|
||||
-- end
|
||||
-- end,
|
||||
open_mapping = [[<leader>`]], -- or { [[<c-\>]], [[<c-¥>]] } if you also use a Japanese keyboard.
|
||||
hide_numbers = true, -- hide the number column in toggleterm buffers
|
||||
shade_filetypes = {},
|
||||
autochdir = false, -- when neovim changes it current directory the terminal will change it's own when next it's opened
|
||||
-- highlights = {
|
||||
-- -- highlights which map to a highlight group name and a table of it's values
|
||||
-- -- NOTE: this is only a subset of values, any group placed here will be set for the terminal window split
|
||||
-- Normal = {
|
||||
-- -- guibg = "<VALUE-HERE>",
|
||||
-- },
|
||||
-- NormalFloat = {
|
||||
-- link = "Normal",
|
||||
-- },
|
||||
-- FloatBorder = {
|
||||
-- guifg = "<VALUE-HERE>",
|
||||
-- guibg = "<VALUE-HERE>",
|
||||
-- },
|
||||
-- },
|
||||
shade_terminals = true, -- NOTE: this option takes priority over highlights specified so if you specify Normal highlights you should set this to false
|
||||
-- shading_factor = "<number>", -- the percentage by which to lighten dark terminal background, default: -30
|
||||
-- shading_ratio = "<number>", -- the ratio of shading factor for light/dark terminal background, default: -3
|
||||
start_in_insert = true,
|
||||
insert_mappings = false, -- whether or not the open mapping applies in insert mode
|
||||
terminal_mappings = true, -- whether or not the open mapping applies in the opened terminals
|
||||
persist_size = true,
|
||||
persist_mode = true, -- if set to true (default) the previous terminal mode will be remembered
|
||||
direction = "tab",
|
||||
-- direction = "horizontal",
|
||||
close_on_exit = true, -- close the terminal window when the process exits
|
||||
-- Change the default shell. Can be a string or a function returning a string
|
||||
shell = vim.o.shell,
|
||||
auto_scroll = true, -- automatically scroll to the bottom on terminal output
|
||||
-- This field is only relevant if direction is set to 'float'
|
||||
-- float_opts = {
|
||||
-- -- The border key is *almost* the same as 'nvim_open_win'
|
||||
-- -- see :h nvim_open_win for details on borders however
|
||||
-- -- the 'curved' border is a custom border type
|
||||
-- -- not natively supported but implemented in this plugin.
|
||||
-- border = 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open
|
||||
-- -- like `size`, width, height, row, and col can be a number or function which is passed the current terminal
|
||||
-- width = <value>,
|
||||
-- height = <value>,
|
||||
-- row = <value>,
|
||||
-- col = <value>,
|
||||
-- winblend = 3,
|
||||
-- zindex = <value>,
|
||||
-- title_pos = 'left' | 'center' | 'right', position of the title of the floating window
|
||||
-- },
|
||||
-- winbar = {
|
||||
-- enabled = false,
|
||||
-- name_formatter = function(term) -- term: Terminal
|
||||
-- return term.name
|
||||
-- end,
|
||||
-- },
|
||||
})
|
|
@ -1,21 +0,0 @@
|
|||
-- disable netrw at the very start of your init.lua
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- optionally enable 24-bit colour
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
local function myOnAttach(bufnr)
|
||||
local api = require("nvim-tree.api")
|
||||
|
||||
local function opts(desc)
|
||||
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||
end
|
||||
-- defaults
|
||||
api.config.mappings.default_on_attach(bufnr)
|
||||
vim.keymap.set("n", "<C-t>", api.tree.close, opts("close tree with ctrl+t"))
|
||||
end
|
||||
-- OR setup with some options
|
||||
require("nvim-tree").setup({
|
||||
on_attach = myOnAttach,
|
||||
})
|
|
@ -1,26 +0,0 @@
|
|||
require("nvim-treesitter.configs").setup({
|
||||
-- A list of parser names, or "all"
|
||||
ensure_installed = "all",
|
||||
|
||||
-- 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,
|
||||
|
||||
highlight = {
|
||||
-- `false` will disable the whole extension
|
||||
enable = true,
|
||||
|
||||
-- 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 = false,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
||||
require('nvim-ts-autotag').setup()
|
|
@ -1,17 +0,0 @@
|
|||
vim.o.foldcolumn = "1" -- '0' is not bad
|
||||
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
||||
|
||||
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
|
||||
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
||||
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
||||
|
||||
-- Option 2: nvim lsp as LSP client
|
||||
-- Tell the server the capability of foldingRange,
|
||||
-- Neovim hasn't added foldingRange to default capabilities, users must add it manually
|
||||
-- in setuplsp.lua
|
||||
require("ufo").setup()
|
||||
--
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
require("tokyonight").setup({
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
style = "storm", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day`
|
||||
light_style = "day", -- The theme is used when the background is set to light
|
||||
transparent = true, -- Enable this to disable setting the background color
|
||||
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in [Neovim](https://github.com/neovim/neovim)
|
||||
styles = {
|
||||
-- Style to be applied to different syntax groups
|
||||
-- Value is any valid attr-list value for `:help nvim_set_hl`
|
||||
comments = { italic = true },
|
||||
keywords = { italic = true },
|
||||
functions = {},
|
||||
variables = {},
|
||||
-- Background styles. Can be "dark", "transparent" or "normal"
|
||||
sidebars = "dark", -- style for sidebars, see below
|
||||
floats = "dark", -- style for floating windows
|
||||
},
|
||||
sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]`
|
||||
day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors
|
||||
hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**.
|
||||
dim_inactive = false, -- dims inactive windows
|
||||
lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold
|
||||
|
||||
--- You can override specific color groups to use other groups or a hex color
|
||||
--- function will be called with a ColorScheme table
|
||||
---@param colors ColorScheme
|
||||
on_colors = function(colors) end,
|
||||
|
||||
--- You can override specific highlights to use other groups or a hex color
|
||||
--- function will be called with a Highlights and ColorScheme table
|
||||
---@param highlights Highlights
|
||||
---@param colors ColorScheme
|
||||
on_highlights = function(highlights, colors) end,
|
||||
})
|
Loading…
Reference in a new issue