mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-30 05:46:37 +00:00
chore(nvim): tweaks, docs, updates
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"barbecue.nvim": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" },
|
||||
"bufdelete.nvim": { "branch": "master", "commit": "07d1f8ba79dec59d42b975a4df1c732b2e4e37b4" },
|
||||
"catppuccin": { "branch": "main", "commit": "a937d546f4783a1ff67f84043d2d7871ad4ecd83" },
|
||||
"catppuccin": { "branch": "main", "commit": "85e93601e0f0b48aa2c6bbfae4d0e9d7a1898280" },
|
||||
"close-buffers.nvim": { "branch": "master", "commit": "3acbcad1211572342632a6c0151f839e7dead27f" },
|
||||
"comment-box.nvim": { "branch": "main", "commit": "dd1a48f8d06102e9b87ae1e0069bc365c006979b" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "c1e1d5fa44fe08811b6ef4aadac2b50e602f9504" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "983f1a216cca1a079399ba050bc4b9ce130de83a" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "89b633f3bd0b7187f070236b348697de176860e2" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "907ae8636016aab2f283576fc60d46ca3427e579" },
|
||||
"harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
|
||||
"lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" },
|
||||
"mason.nvim": { "branch": "main", "commit": "ee6a7f179ebf8aa9da9d53b1cf1b57d292ea0182" },
|
||||
"mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" },
|
||||
"mini.nvim": { "branch": "main", "commit": "707dca4f4152c2d9c9b4c5e02635f78dfd33db50" },
|
||||
"neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "dcd34653b0f1d3e7ea9aeb3e37dc7c8da445c4fe" },
|
||||
@@ -21,27 +21,27 @@
|
||||
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
|
||||
"nvim-dap": { "branch": "master", "commit": "0e6b7c47dd70e80793ed39271b2aa712d9366dbc" },
|
||||
"nvim-dap-go": { "branch": "main", "commit": "1b508e9db330108d3b5d62a6d9cc01fe6bbdd4e0" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "0517d8522dcec286b1dba47aa3ee1ed8f523aed6" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "360a895125ac4f39df6aa8f763635eff07e69fff" },
|
||||
"nvim-navic": { "branch": "master", "commit": "9c89730da6a05acfeb6a197e212dfadf5aa60ca0" },
|
||||
"nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" },
|
||||
"nvim-notify": { "branch": "master", "commit": "94859430020f5cf32a1b97ddd9e596fed9db7981" },
|
||||
"nvim-regexplainer": { "branch": "main", "commit": "4250c8f3c1307876384e70eeedde5149249e154f" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "dfcfdb0e7bcb362c4de1ed7d0015c21957c91ba7" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "2461e5ac21c59950457fea4b3f9f184f0daa8913" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "b6c763db8cc486215ba96e0a67418848a710ab25" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "bc11ee2498de2310de5776477dd9dce65d03b464" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "925e2aa30dc9fe9332060199c19f132ec0f3d493" },
|
||||
"nvim-window-picker": { "branch": "main", "commit": "1b1bb834b0acb9eebb11a61664efc665757f1ba2" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "a56bf0071bf63d35274fdc4738bb1e8821cfd2ea" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" },
|
||||
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||
"refactoring.nvim": { "branch": "master", "commit": "2ec9bc0fb5f3c8c6a0f776f0159dd2a3b1663554" },
|
||||
"restoreview": { "branch": "main", "commit": "03d00d59a9ba640db6b44192ed0fcc9d7261dcd2" },
|
||||
"schemastore.nvim": { "branch": "main", "commit": "b6e498b2e34af832311472a07d4d5e349e2e7c62" },
|
||||
"smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" },
|
||||
"schemastore.nvim": { "branch": "main", "commit": "8c388a1a38ae1b618eef06a6b0388f5ff33867bd" },
|
||||
"smartcolumn.nvim": { "branch": "main", "commit": "c6abf3917fcec487c7475e208ae37f5788af5b04" },
|
||||
"stickybuf.nvim": { "branch": "master", "commit": "4c667bc837e5e3fec5a8857ee99f1a229fc76df9" },
|
||||
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
|
||||
"tabnine": { "branch": "master", "commit": "dcca6d2f9e8bbcde36aab87b9b87890810e4056d" },
|
||||
"tabnine": { "branch": "master", "commit": "cceef1024aa1d8a17698a77c499a124fe85f1f79" },
|
||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "ad7b637c72549713b9aaed7c4f9c79c62bcbdff0" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "18f10f28007cb8b4d50324217349c3f568684be2" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "a19770625aed49ad2a9f591a5e3946707f7359f6" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "b90a1381e9b5b8596f49070ee86c71db267ac868" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" },
|
||||
"twilight.nvim": { "branch": "main", "commit": "a4843e6e67092a1e6fa9666f02bf0ab59174c1df" },
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
-- To be used anywhere.
|
||||
local function job(command) vim.api.nvim_command("call jobstart('" .. command .. "')") end
|
||||
-- luacheck: globals vim
|
||||
|
||||
local function format()
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
pattern = "<buffer>",
|
||||
callback = function() vim.lsp.buf.format() end,
|
||||
})
|
||||
end
|
||||
-- To be used anywhere.
|
||||
-- local function job(command) vim.api.nvim_command("call jobstart('" .. command .. "')") end
|
||||
|
||||
local function yaml_ft(path, bufnr)
|
||||
-- get content of buffer as string
|
||||
@@ -45,7 +40,7 @@ vim.filetype.add({
|
||||
csv = "csv",
|
||||
cl = "opencl",
|
||||
env = "env",
|
||||
sh = "zsh",
|
||||
sh = "bash",
|
||||
--
|
||||
},
|
||||
pattern = {
|
||||
@@ -54,10 +49,10 @@ vim.filetype.add({
|
||||
-- [".*config/nvim/.*"] = function() vim.api.nvim_command "cd ~/.config/nvim/" end,
|
||||
|
||||
---- Typescript Projects
|
||||
[".*/src/.*ts"] = function() format() end,
|
||||
[".*/src/.*json"] = function() format() end,
|
||||
[".*/src/.*scss"] = function() format() end,
|
||||
[".*/src/.*html"] = function() format() end,
|
||||
-- [".*/src/.*ts"] = function() format() end,
|
||||
-- [".*/src/.*json"] = function() format() end,
|
||||
-- [".*/src/.*scss"] = function() format() end,
|
||||
-- [".*/src/.*html"] = function() format() end,
|
||||
|
||||
--[".*Code/ivuorinen/[project]/src/.*ts"] = function()
|
||||
-- vim.api.nvim_command('cd ~/Code/ivuorinen/[project]/')
|
||||
@@ -73,5 +68,6 @@ vim.filetype.add({
|
||||
["tsconfig.json"] = "json5",
|
||||
|
||||
[".ignore"] = "gitignore",
|
||||
["docker-compose.yml"] = "yaml.docker-compose",
|
||||
},
|
||||
})
|
||||
|
||||
@@ -21,7 +21,7 @@ wk.register({
|
||||
name = "+buffer",
|
||||
n = { "<cmd>tabnew<cr>", "[n]ew tab" },
|
||||
a = {
|
||||
name = "+annotate"
|
||||
name = "+annotate",
|
||||
-- defined in plugins/neogen.lua
|
||||
},
|
||||
c = {
|
||||
|
||||
@@ -6,18 +6,20 @@ CAPABILITIES.textDocument.completion.completionItem.snippetSupport = true
|
||||
|
||||
-- [[ Configure LSP ]]
|
||||
-- This function gets run when an LSP connects to a particular buffer.
|
||||
local on_attach = function(_, bufnr)
|
||||
local on_attach = function(client, bufnr)
|
||||
local nmap = function(keys, func, desc)
|
||||
if desc then desc = "LSP: " .. desc end
|
||||
|
||||
vim.keymap.set("n", keys, func, { buffer = bufnr, desc = desc })
|
||||
end
|
||||
|
||||
if client.server_capabilities.documentSymbolProvider then require("nvim-navic").attach(client, bufnr) end
|
||||
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.register({
|
||||
l = {
|
||||
name = "LSP",
|
||||
name = "+lsp",
|
||||
n = { vim.lsp.buf.rename, "Rename" },
|
||||
c = { vim.lsp.buf.code_action, "Code Action" },
|
||||
f = { "<cmd>Format", "Format current buffer with LSP" },
|
||||
@@ -33,7 +35,7 @@ local on_attach = function(_, bufnr)
|
||||
},
|
||||
},
|
||||
g = {
|
||||
name = "Goto",
|
||||
name = "+goto",
|
||||
d = { vim.lsp.buf.definition, "[G]oto [D]efinition" },
|
||||
r = { require("telescope.builtin").lsp_references, "[G]oto [R]eferences" },
|
||||
I = { vim.lsp.buf.implementation, "[G]oto [I]mplementation" },
|
||||
@@ -48,12 +50,12 @@ local on_attach = function(_, bufnr)
|
||||
nmap("<C-k>", vim.lsp.buf.signature_help, "Signature Documentation")
|
||||
|
||||
-- Create a command `:Format` local to the LSP buffer
|
||||
vim.api.nvim_buf_create_user_command(
|
||||
bufnr,
|
||||
"Format",
|
||||
function(_) vim.lsp.buf.format() end,
|
||||
{ desc = "Format current buffer with LSP" }
|
||||
)
|
||||
-- vim.api.nvim_buf_create_user_command(
|
||||
-- bufnr,
|
||||
-- "Format",
|
||||
-- function(_) vim.lsp.buf.format() end,
|
||||
-- { desc = "Format current buffer with LSP" }
|
||||
-- )
|
||||
end
|
||||
|
||||
-- Enable the following language servers
|
||||
@@ -71,13 +73,38 @@ local servers = {
|
||||
ansiblels = {},
|
||||
bashls = {},
|
||||
clangd = {},
|
||||
cssls = {
|
||||
cmd = { "vscode-css-language-server", "--stdio" },
|
||||
filetypes = { "css", "scss", "less" },
|
||||
-- root_dir = root_pattern("package.json", ".git") or bufdir,
|
||||
settings = {
|
||||
css = {
|
||||
validate = true,
|
||||
},
|
||||
less = {
|
||||
validate = true,
|
||||
},
|
||||
scss = {
|
||||
validate = true,
|
||||
},
|
||||
},
|
||||
single_file_support = true,
|
||||
capabilities = CAPABILITIES,
|
||||
},
|
||||
diagnosticls = {},
|
||||
docker_compose_language_service = {},
|
||||
dockerls = {},
|
||||
eslint = {},
|
||||
gopls = {},
|
||||
eslint = {}, -- JS
|
||||
gopls = {}, -- Go
|
||||
graphql = {},
|
||||
html = { filetypes = { "html", "twig", "hbs" } },
|
||||
intelephense = {},
|
||||
jsonls = {},
|
||||
intelephense = {}, -- PHP
|
||||
jsonls = {
|
||||
json = {
|
||||
schemas = require("schemastore").json.schemas(),
|
||||
validate = { enable = true },
|
||||
},
|
||||
},
|
||||
lua_ls = {
|
||||
Lua = {
|
||||
diagnostics = { globals = { "vim" } },
|
||||
@@ -85,115 +112,33 @@ local servers = {
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
},
|
||||
marksman = {},
|
||||
pyright = {},
|
||||
rust_analyzer = {},
|
||||
terraformls = {},
|
||||
tsserver = {},
|
||||
vuels = {},
|
||||
yamlls = {},
|
||||
marksman = {}, -- Markdown
|
||||
psalm = {}, -- PHP
|
||||
pylsp = {}, -- Python
|
||||
pyright = {}, -- Python
|
||||
rust_analyzer = {}, -- Rust
|
||||
terraformls = {}, -- Terraform
|
||||
tsserver = {}, -- TypeScript
|
||||
vuels = {}, -- Vue
|
||||
yamlls = { -- YAML
|
||||
yaml = {
|
||||
schemaStore = {
|
||||
-- You must disable built-in schemaStore support if you want to use
|
||||
-- this plugin and its advanced options like `ignore`.
|
||||
enable = false,
|
||||
-- Avoid TypeError: Cannot read properties of undefined (reading 'length')
|
||||
url = "",
|
||||
},
|
||||
schemas = require("schemastore").yaml.schemas(),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Setup neovim lua configuration
|
||||
require("neodev").setup()
|
||||
|
||||
-- nvim-cmp supports additional completion capabilities,
|
||||
-- so broadcast that to servers
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
|
||||
-- Ensure the servers above are installed
|
||||
local mason_lspconfig = require("mason-lspconfig")
|
||||
|
||||
mason_lspconfig.setup({
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = vim.tbl_keys(servers),
|
||||
automatic_installation = true,
|
||||
automatic_installtion = true,
|
||||
})
|
||||
|
||||
mason_lspconfig.setup_handlers({
|
||||
function(server_name)
|
||||
require("lspconfig")[server_name].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = servers[server_name],
|
||||
filetypes = (servers[server_name] or {}).filetypes,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
-- Configure language servers for specific languages
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
-- Bash Language Server
|
||||
lspconfig.bashls.setup({
|
||||
cmd = {
|
||||
"bash-language-server",
|
||||
"start",
|
||||
},
|
||||
filetypes = { "sh", "zsh" },
|
||||
capabilities = CAPABILITIES,
|
||||
})
|
||||
|
||||
-- HTML
|
||||
lspconfig.html.setup({ capabilities = CAPABILITIES })
|
||||
|
||||
-- JSON
|
||||
lspconfig.jsonls.setup({
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require("schemastore").json.schemas(),
|
||||
validate = { enable = true },
|
||||
},
|
||||
},
|
||||
capabilities = CAPABILITIES,
|
||||
})
|
||||
|
||||
-- Python
|
||||
lspconfig.pylsp.setup({})
|
||||
|
||||
-- CSS + Less + SCSS
|
||||
lspconfig.cssls.setup({
|
||||
cmd = { "vscode-css-language-server", "--stdio" },
|
||||
filetypes = { "css", "scss", "less" },
|
||||
-- root_dir = root_pattern("package.json", ".git") or bufdir,
|
||||
settings = {
|
||||
css = {
|
||||
validate = true,
|
||||
},
|
||||
less = {
|
||||
validate = true,
|
||||
},
|
||||
scss = {
|
||||
validate = true,
|
||||
},
|
||||
},
|
||||
single_file_support = true,
|
||||
capabilities = CAPABILITIES,
|
||||
on_attach = function(client, bufnr)
|
||||
if client.server_capabilities.documentSymbolProvider then require("nvim-navic").attach(client, bufnr) end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
-- rome
|
||||
local util = require("lspconfig.util")
|
||||
lspconfig.rome.setup({
|
||||
root_dir = util.root_pattern("rome.json"),
|
||||
single_file_support = true,
|
||||
on_attach = function(client, bufnr)
|
||||
if client.server_capabilities.documentSymbolProvider then require("nvim-navic").attach(client, bufnr) end
|
||||
end,
|
||||
capabilities = CAPABILITIES,
|
||||
})
|
||||
|
||||
|
||||
-- Typescript + Javascript
|
||||
lspconfig.tsserver.setup({
|
||||
capabilities = CAPABILITIES,
|
||||
on_attach = function(client, bufnr)
|
||||
if client.server_capabilities.documentSymbolProvider then require("nvim-navic").attach(client, bufnr) end
|
||||
end,
|
||||
})
|
||||
|
||||
lspconfig.lua_ls.setup({})
|
||||
lspconfig.yamlls.setup({})
|
||||
|
||||
@@ -1,74 +1,65 @@
|
||||
-- luacheck: globals vim
|
||||
local vim = vim
|
||||
|
||||
-- Use the new FileType system of Neovim.
|
||||
-- let g:do_filetype_lua = 1
|
||||
vim.g.do_filetype_lua = 1
|
||||
|
||||
vim.wo.linebreak = true -- Fix moving through lines 'gk' and 'gj'
|
||||
vim.o.breakindent = true -- Enable break indent
|
||||
vim.o.undofile = true -- Save undo history
|
||||
vim.wo.number = true -- Show lines number (hybrid)
|
||||
vim.wo.linebreak = true -- Fix moving through lines 'gk' and 'gj'
|
||||
vim.o.breakindent = true -- Enable break indent
|
||||
vim.o.undofile = true -- Save undo history
|
||||
vim.wo.number = true -- Show lines number (hybrid)
|
||||
vim.wo.relativenumber = true -- Show lines number (hybrid)
|
||||
vim.wo.signcolumn = "yes" -- Keep signcolumn on by default
|
||||
vim.wo.signcolumn = "yes" -- Keep signcolumn on by default
|
||||
vim.o.laststatus = 3 -- Global statusline.
|
||||
vim.o.cmdheight = 0 -- To have a extra line :)
|
||||
vim.wo.wrap = true -- Set wrap for words
|
||||
vim.o.showtabline = 2 -- Always show tabs
|
||||
vim.o.list = true -- Show xtra spaces
|
||||
vim.o.wildmenu = true -- Set wildmenu for later use
|
||||
vim.o.hlsearch = true -- Highlighting search
|
||||
vim.o.ruler = true -- Set ruler for better look
|
||||
vim.o.hidden = true -- No nice message
|
||||
vim.o.showcmd = true -- Partial commands only in the screen
|
||||
vim.o.showmatch = true -- Match braces when inserting new ones
|
||||
vim.opt.backup = false -- No backups because some plugins freak out
|
||||
vim.opt.writebackup = false -- No backups because some plugins freak out
|
||||
vim.o.scrolloff = 40 -- Off scroll when moving through the buffer
|
||||
vim.go.termguicolors = true -- For terminal RGB colours
|
||||
vim.go.t_Co = "256" -- Colours, I believe
|
||||
vim.go.t_ut = "" -- Colours, I believe
|
||||
vim.o.laststatus = 3 -- Space for tabs
|
||||
vim.o.softtabstop = 2 -- Space for tabs
|
||||
vim.o.expandtab = true -- Expand tab to use spaces instead
|
||||
vim.o.tabstop = 2 -- Space for tabs
|
||||
vim.bo.shiftwidth = 2 -- Space for tabs
|
||||
vim.o.shiftwidth = 2 -- Space for tabs
|
||||
vim.o.formatoptions = "tqj" -- Format options to not create new lines with comments
|
||||
vim.o.mouse = "a" -- Mouse working with neovim
|
||||
|
||||
-- Case-insensitive searching UNLESS \C or capital in search
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
|
||||
vim.o.cmdheight = 0 -- To have a extra line :)
|
||||
vim.wo.wrap = true -- Set wrap for words
|
||||
vim.o.showtabline = 2 -- Always show tabs
|
||||
vim.opt.list = true -- Show xtra spaces
|
||||
vim.o.wildmenu = true -- Set wildmenu for later use
|
||||
vim.o.hlsearch = true -- Highlighting search
|
||||
vim.o.ruler = true -- Set ruler for better look
|
||||
vim.o.hidden = true -- No nice message
|
||||
vim.o.showcmd = true -- Partial commands only in the screen
|
||||
vim.o.showmatch = true -- Match braces when inserting new ones
|
||||
|
||||
-- Cursor line
|
||||
---- Cursor column
|
||||
vim.o.cursorline = true
|
||||
vim.wo.cursorline = true
|
||||
vim.o.cursorcolumn = true
|
||||
vim.wo.cursorcolumn = true
|
||||
|
||||
vim.o.scrolloff = 40 -- Off scroll when moving through the buffer
|
||||
vim.go.termguicolors = true -- For terminal RGB colours
|
||||
vim.go.t_Co = "256" -- Colours, I believe
|
||||
vim.go.t_ut = "" -- Colours, I believe
|
||||
vim.o.laststatus = 3 -- Space for tabs
|
||||
vim.o.softtabstop = 2 -- Space for tabs
|
||||
vim.o.expandtab = true -- Expand tab to use spaces instead
|
||||
vim.o.tabstop = 2 -- Space for tabs
|
||||
vim.bo.shiftwidth = 2 -- Space for tabs
|
||||
vim.o.shiftwidth = 2 -- Space for tabs
|
||||
|
||||
vim.o.formatoptions = "tqj" -- Format options to not create new lines with comments
|
||||
vim.o.mouse = "a" -- Mouse working with neovim
|
||||
|
||||
-- viminfo file
|
||||
-- vim.o.viminfo = vim.o.viminfo .. '~/.config/nvim/viminfo'
|
||||
|
||||
-- Spell language to English (UK)
|
||||
vim.o.spelllang = "en_gb"
|
||||
vim.bo.spelllang = "en_gb"
|
||||
|
||||
vim.opt.laststatus = 2 -- Global statusline.
|
||||
|
||||
-- When "on" the commands listed below move the cursor to the first non-blank
|
||||
-- of the line. When off the cursor is kept in the same column (if possible).
|
||||
-- https://neovim.io/doc/user/options.html#'startofline'
|
||||
vim.opt.startofline = true
|
||||
|
||||
-- Set path for better searching across the system
|
||||
-- vim.o.path = vim.o.path .. '**'
|
||||
vim.o.startofline = true
|
||||
|
||||
-- Complete options
|
||||
vim.o.completeopt = "menuone,longest,noselect"
|
||||
vim.o.shortmess = vim.o.shortmess .. "c"
|
||||
|
||||
vim.go.pumblend = 10 -- Menu Transparency.
|
||||
|
||||
-- ╭──────────────────────────────────────────────────────────╮
|
||||
-- │ Variables │
|
||||
-- ╰──────────────────────────────────────────────────────────╯
|
||||
@@ -87,9 +78,6 @@ vim.api.nvim_set_option("title", true)
|
||||
-- Set clipboard to be global across the system
|
||||
vim.api.nvim_set_option("clipboard", "unnamedplus")
|
||||
|
||||
-- Basic fold column
|
||||
vim.api.nvim_set_option("foldcolumn", "1")
|
||||
|
||||
-- Set dictionary to language spell
|
||||
vim.api.nvim_set_option("dictionary", "/usr/share/dict/words")
|
||||
|
||||
@@ -101,5 +89,6 @@ vim.api.nvim_set_option(
|
||||
|
||||
-- Folding
|
||||
vim.api.nvim_set_option("foldmethod", "syntax")
|
||||
vim.api.nvim_set_option('foldenable', false)
|
||||
vim.api.nvim_set_option('foldminlines', 5)
|
||||
vim.api.nvim_set_option("foldenable", false)
|
||||
vim.api.nvim_set_option("foldminlines", 5)
|
||||
vim.api.nvim_set_option("foldcolumn", "1")
|
||||
|
||||
@@ -5,10 +5,10 @@ return {
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig",
|
||||
"SmiteshP/nvim-navic",
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
version = "*",
|
||||
config = {
|
||||
opts = {
|
||||
theme = "catppuccin",
|
||||
|
||||
-- If you set this to false, floating windows will look weird
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = {
|
||||
opts = {
|
||||
signs = {
|
||||
add = { hl = "GitSignsAdd", text = "┃", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" },
|
||||
change = { hl = "GitSignsChange", text = "┃", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
-- luacheck: globals vim
|
||||
local vim = vim
|
||||
|
||||
return {
|
||||
-- plenary: full; complete; entire; absolute; unqualified.
|
||||
-- All the lua functions I don't want to write twice.
|
||||
-- https://github.com/nvim-lua/plenary.nvim
|
||||
{ "nvim-lua/plenary.nvim", lazy = true },
|
||||
{ "nvim-lua/plenary.nvim", lazy = true },
|
||||
|
||||
-- lua `fork` of vim-web-devicons for neovim
|
||||
-- https://github.com/nvim-tree/nvim-web-devicons
|
||||
{ "kyazdani42/nvim-web-devicons" },
|
||||
{ "nvim-tree/nvim-web-devicons" },
|
||||
|
||||
-- The theme of choise, catppuccin
|
||||
-- https://github.com/catppuccin/nvim
|
||||
@@ -38,6 +39,7 @@ return {
|
||||
},
|
||||
cmp = true,
|
||||
dap = { enabled = true, enable_ui = true },
|
||||
fidget = true,
|
||||
gitsigns = true,
|
||||
harpoon = true,
|
||||
indent_blankline = {
|
||||
@@ -45,6 +47,7 @@ return {
|
||||
colored_indent_levels = false,
|
||||
},
|
||||
mason = true,
|
||||
mini = true,
|
||||
neotree = true,
|
||||
notify = true,
|
||||
native_lsp = {
|
||||
@@ -185,21 +188,17 @@ return {
|
||||
-- A neovim lua plugin to help easily manage multiple terminal windows
|
||||
-- https://github.com/akinsho/toggleterm.nvim
|
||||
{
|
||||
'akinsho/toggleterm.nvim',
|
||||
"akinsho/toggleterm.nvim",
|
||||
version = "*",
|
||||
opts = {
|
||||
open_mapping = [[<c-t>]],
|
||||
insert_mappings = true,
|
||||
-- direction = "float",
|
||||
float_opts = {
|
||||
width = function()
|
||||
return math.floor(vim.o.columns * 0.9)
|
||||
end,
|
||||
height = function()
|
||||
return math.floor(vim.o.lines * 0.9)
|
||||
end,
|
||||
width = function() return math.floor(vim.o.columns * 0.9) end,
|
||||
height = function() return math.floor(vim.o.lines * 0.9) end,
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
-- Close buffer without messing up with the window.
|
||||
@@ -210,7 +209,7 @@ return {
|
||||
-- https://github.com/kazhala/close-buffers.nvim
|
||||
{ "kazhala/close-buffers.nvim" },
|
||||
|
||||
-- JSONLS
|
||||
-- JSON schemas for Neovim
|
||||
-- https://github.com/b0o/schemastore.nvim
|
||||
{ "b0o/schemastore.nvim" },
|
||||
|
||||
@@ -226,7 +225,7 @@ return {
|
||||
-- https://github.com/bennypowers/nvim-regexplainer
|
||||
{
|
||||
"bennypowers/nvim-regexplainer",
|
||||
requires = {
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
@@ -256,9 +255,5 @@ return {
|
||||
|
||||
-- Vim plugin for automatic time tracking and metrics generated from your programming activity.
|
||||
-- https://github.com/wakatime/vim-wakatime
|
||||
{
|
||||
"wakatime/vim-wakatime",
|
||||
lazy = false,
|
||||
enabled = true,
|
||||
},
|
||||
{ "wakatime/vim-wakatime", lazy = false, enabled = true },
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
{
|
||||
-- only needed if you want to use the commands with "_with_window_picker" suffix
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
-- https://github.com/folke/trouble.nvim
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
dependencies = "kyazdani42/nvim-web-devicons",
|
||||
config = {
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
opts = {
|
||||
-- position of the list can be: bottom, top, left, right
|
||||
position = "bottom",
|
||||
-- height of the trouble list when position is top or bottom
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
-- https://github.com/folke/twilight.nvim
|
||||
return {
|
||||
"folke/twilight.nvim",
|
||||
config = {
|
||||
opts = {
|
||||
dimming = {
|
||||
-- amount of dimming
|
||||
alpha = 0.2,
|
||||
|
||||
Reference in New Issue
Block a user