30/10 Update
Signed-off-by: TiagoRG <tiago.rgarcia@ua.pt>
This commit is contained in:
parent
40357fb351
commit
3593373bcf
|
@ -0,0 +1 @@
|
||||||
|
IndentWidth: 4
|
|
@ -7,19 +7,19 @@ lsp.nvim_workspace()
|
||||||
|
|
||||||
|
|
||||||
local cmp = require('cmp')
|
local cmp = require('cmp')
|
||||||
local cmp_select = {behavior = cmp.SelectBehavior.Select}
|
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
||||||
local cmp_mappings = lsp.defaults.cmp_mappings({
|
local cmp_mappings = lsp.defaults.cmp_mappings({
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
||||||
['<Tab>'] = cmp.mapping.confirm({ select = true }),
|
['<Tab>'] = cmp.mapping.confirm({ select = true }),
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
})
|
})
|
||||||
|
|
||||||
-- cmp_mappings['<Tab>'] = nil
|
-- cmp_mappings['<Tab>'] = nil
|
||||||
-- cmp_mappings['<S-Tab>'] = nil
|
-- cmp_mappings['<S-Tab>'] = nil
|
||||||
|
|
||||||
lsp.setup_nvim_cmp({
|
lsp.setup_nvim_cmp({
|
||||||
mapping = cmp_mappings
|
mapping = cmp_mappings
|
||||||
})
|
})
|
||||||
|
|
||||||
lsp.set_preferences({
|
lsp.set_preferences({
|
||||||
|
@ -33,18 +33,18 @@ lsp.set_preferences({
|
||||||
})
|
})
|
||||||
|
|
||||||
lsp.on_attach(function(client, bufnr)
|
lsp.on_attach(function(client, bufnr)
|
||||||
local opts = {buffer = bufnr, remap = false}
|
local opts = { buffer = bufnr, remap = false }
|
||||||
|
|
||||||
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||||
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
|
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
||||||
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
|
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
|
||||||
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
|
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
|
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
||||||
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
lsp.setup()
|
lsp.setup()
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
-- The setup config table shows all available config options with their default values:
|
-- The setup config table shows all available config options with their default values:
|
||||||
require("presence").setup({
|
require("presence").setup({
|
||||||
-- General options
|
-- General options
|
||||||
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
|
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
|
||||||
-- neovim_image_text = "The One True Text Editor", -- Text displayed when hovered over the Neovim image
|
neovim_image_text = "The One True Text Editor", -- Text displayed when hovered over the Neovim image
|
||||||
neovim_image_text = "Neovim", -- Text displayed when hovered over the Neovim image
|
--neovim_image_text = "Neovim", -- Text displayed when hovered over the Neovim image
|
||||||
main_image = "file", -- Main image display (either "neovim" or "file")
|
main_image = "file", -- Main image display (either "neovim" or "file")
|
||||||
client_id = "793271441293967371", -- Use your own Discord application client id (not recommended)
|
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")
|
log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
|
||||||
debounce_timeout = 1, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
|
debounce_timeout = 1, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
|
||||||
enable_line_number = false, -- Displays the current line number instead of the current project
|
enable_line_number = false, -- 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
|
blacklist = {"glua-atas"}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
|
||||||
buttons = true, -- 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)
|
buttons = true, -- 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)
|
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
|
show_time = true, -- Show the timer
|
||||||
|
|
||||||
-- Rich Presence text options
|
-- 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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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,9 +1,9 @@
|
||||||
require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {
|
||||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||||
ensure_installed = { "bash", "lua", "vim", "vimdoc", "query", "regex",
|
-- ensure_installed = { "bash", "lua", "vim", "vimdoc", "query", "regex",
|
||||||
"c", "cpp", "c_sharp", "rust", "python",
|
-- "c", "cpp", "c_sharp", "rust", "python",
|
||||||
"html", "css", "php", "javascript", "typescript", "sql"
|
-- "html", "css", "php", "javascript", "typescript", "sql"
|
||||||
},
|
-- },
|
||||||
|
|
||||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
|
|
|
@ -25,7 +25,9 @@ vim.keymap.set("i", "<C-c>", "<Esc>")
|
||||||
vim.keymap.set("n", "Q", "<nop>")
|
vim.keymap.set("n", "Q", "<nop>")
|
||||||
vim.keymap.set("n", "<C-f>", "<cmd>silent !tmux neww tmux-sessionizer<CR>")
|
vim.keymap.set("n", "<C-f>", "<cmd>silent !tmux neww tmux-sessionizer<CR>")
|
||||||
vim.keymap.set("n", "<leader>f", vim.lsp.buf.format)
|
vim.keymap.set("n", "<leader>f", vim.lsp.buf.format)
|
||||||
vim.keymap.set("n", "<leader>a", "ggVG")
|
|
||||||
|
vim.keymap.set("n", "<leader>af", "ggVG")
|
||||||
|
vim.keymap.set("n", "<leader>ab", "GVgg")
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
|
vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
|
||||||
vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
|
vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
|
||||||
|
|
|
@ -271,9 +271,11 @@ fi
|
||||||
# ALL EDITORS CRINGE!
|
# ALL EDITORS CRINGE!
|
||||||
# NEOVIM FOR THE WIN!
|
# NEOVIM FOR THE WIN!
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
#alias vim='gnome-terminal --maximize --title "Neovim" -- nvim'
|
|
||||||
alias vim='nvim'
|
alias vim='nvim'
|
||||||
|
|
||||||
|
#alias vim='gnome-terminal --maximize --title "Neovim" -- nvim'
|
||||||
|
|
||||||
|
|
||||||
# Custom made alias
|
# Custom made alias
|
||||||
|
|
||||||
alias zshrc='vim /home/tiagorg/.zsh/.zshrc'
|
alias zshrc='vim /home/tiagorg/.zsh/.zshrc'
|
||||||
|
|
Loading…
Reference in New Issue