mirror of
https://github.com/sadan4/nvim.git
synced 2024-11-16 22:34:39 -05:00
file
This commit is contained in:
parent
f18543cfa7
commit
c5b2c0b584
6 changed files with 73 additions and 21 deletions
|
@ -56,3 +56,4 @@ vim.keymap.set("v", "<A-v>", "\"+p", {})
|
|||
vim.keymap.set("n", "<A-v>", "\"+p", {})
|
||||
-- lsp rename
|
||||
vim.keymap.set("n", "<F2>", vim.lsp.buf.rename, {})
|
||||
vim.keymap.set({"n", "v"}, ";", ":")
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
local plugins = {
|
||||
{
|
||||
"lambdalisue/suda.vim",
|
||||
},
|
||||
{
|
||||
"andweeb/presence.nvim"
|
||||
},
|
||||
{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
},
|
||||
|
|
|
@ -6,4 +6,11 @@ vim.opt.shiftround = true
|
|||
vim.opt.shiftwidth = 4
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.scrolloff = 4
|
||||
vim.opt.scrolloff = 6
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
||||
|
||||
callback = function()
|
||||
package.loaded.presence:update()
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -18,3 +18,5 @@ require("setupufo")
|
|||
require("setupcomment")
|
||||
-- setup function signature
|
||||
require("setupsig")
|
||||
|
||||
require("setupDiscord")
|
||||
|
|
33
lua/setupDiscord.lua
Normal file
33
lua/setupDiscord.lua
Normal file
|
@ -0,0 +1,33 @@
|
|||
-- 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 = { "nitro" }, -- 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/sadanslargehole",
|
||||
},
|
||||
{
|
||||
label = "My website",
|
||||
url = "https://sadanslargehole.com",
|
||||
},
|
||||
}, -- 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,6 +1,6 @@
|
|||
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/dloc/server_configurations.md
|
||||
require("neodev").setup({
|
||||
-- add any options here, or leave empty to use the default settings
|
||||
-- add any options here, or leave empty to use the default settings
|
||||
})
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
|
@ -9,6 +9,9 @@ capabilities.textDocument.foldingRange = {
|
|||
lineFoldingOnly = true,
|
||||
}
|
||||
|
||||
require("lspconfig").jsonls.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
require("lspconfig").yamlls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
|
@ -65,7 +68,7 @@ require("lspconfig").lua_ls.setup({
|
|||
workspace = {
|
||||
checkThirdParty = false,
|
||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
|
||||
library = vim.api.nvim_get_runtime_file("", true)
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
},
|
||||
})
|
||||
end,
|
||||
|
@ -127,21 +130,21 @@ require("setupclangdext")
|
|||
require("null-ls").setup()
|
||||
|
||||
require("eslint").setup({
|
||||
bin = 'eslint_d', -- or `eslint`
|
||||
code_actions = {
|
||||
enable = true,
|
||||
apply_on_save = {
|
||||
enable = true,
|
||||
types = { "directive", "problem", "suggestion", "layout" },
|
||||
},
|
||||
disable_rule_comment = {
|
||||
enable = true,
|
||||
location = "separate_line", -- or `same_line`
|
||||
},
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
report_unused_disable_directives = false,
|
||||
run_on = "type", -- or `save`
|
||||
},
|
||||
bin = "eslint_d", -- or `eslint`
|
||||
code_actions = {
|
||||
enable = true,
|
||||
apply_on_save = {
|
||||
enable = true,
|
||||
types = { "directive", "problem", "suggestion", "layout" },
|
||||
},
|
||||
disable_rule_comment = {
|
||||
enable = true,
|
||||
location = "separate_line", -- or `same_line`
|
||||
},
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
report_unused_disable_directives = false,
|
||||
run_on = "type", -- or `save`
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue