aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua')
-rw-r--r--.config/nvim/lua/general.lua12
-rw-r--r--.config/nvim/lua/keybinds.lua2
-rw-r--r--.config/nvim/lua/lsp.lua58
-rw-r--r--.config/nvim/lua/plugins.lua1
4 files changed, 43 insertions, 30 deletions
diff --git a/.config/nvim/lua/general.lua b/.config/nvim/lua/general.lua
index 6732d38..ab386b9 100644
--- a/.config/nvim/lua/general.lua
+++ b/.config/nvim/lua/general.lua
@@ -16,13 +16,19 @@ vim.opt.listchars:append("eol:↴")
vim.opt.listchars:append("tab:-->")
vim.cmd [[colorscheme dracula]]
-vim.opt.spell = true
+vim.opt.spell = false
vim.opt.spelllang = "en"
vim.g.markdown_fenced_languages = {
"ts=typescript";
- "xml=xml";
- "mermaid=mermaid";
+ "xml";
+ "mermaid";
+ "yaml";
+ "sql";
+ "sh";
+ "console";
+ "cs";
+ "ini";
}
if vim.fn.has("wsl") == 1 then
diff --git a/.config/nvim/lua/keybinds.lua b/.config/nvim/lua/keybinds.lua
index ac3b9d3..8be4c7f 100644
--- a/.config/nvim/lua/keybinds.lua
+++ b/.config/nvim/lua/keybinds.lua
@@ -25,6 +25,7 @@ vim.keymap.set("n", "<Leader><TAB>", telescope.buffers)
vim.keymap.set("n", "<Leader>m", ":MinimapToggle<CR>")
vim.keymap.set("n", "<Leader>,", ":TroubleToggle<CR>")
+vim.keymap.set("n", "<Leader>t", ":belowright split | resize 5 | terminal<CR>")
vim.keymap.set("n", "<Leader>[", ufo.openAllFolds)
vim.keymap.set("n", "<Leader>]", ufo.closeAllFolds)
@@ -46,5 +47,6 @@ wk.register({
["n"] = "Show file tree";
["m"] = "Toggle Minimap";
["d"] = "Show diagnostics";
+ ["t"] = "Open terminal";
}, { prefix = "<leader>" });
diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua
index 82bed0c..11059ff 100644
--- a/.config/nvim/lua/lsp.lua
+++ b/.config/nvim/lua/lsp.lua
@@ -45,15 +45,15 @@ cmp.setup.cmdline(":", {
})
-- Setup lspconfig.
-local capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp
- .protocol
- .make_client_capabilities())
+local cmplsp = require("cmp_nvim_lsp")
+local capabilities = vim.lsp.protocol.make_client_capabilities()
+cmplsp.update_capabilities(vim.lsp.protocol.make_client_capabilities())
+-- Enable (broadcasting) snippet capability for completion
+capabilities.textDocument.completion.completionItem.snippetSupport = true
-require("lspconfig")["denols"].setup { capabilities = capabilities }
-local lspkind = require("lspkind")
-cmp.setup {
+cmp.setup({
formatting = {
- format = lspkind.cmp_format({
+ format = require("lspkind").cmp_format({
mode = "symbol"; -- show only symbol annotations
maxwidth = 50; -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
@@ -62,32 +62,33 @@ cmp.setup {
before = function(entry, vim_item) return vim_item end;
});
};
-}
+})
+
local on_attach = function(client, bufnr)
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
- require("lsp-inlayhints").setup()
- require("lsp-inlayhints").on_attach(client, bufnr)
+ local inlayhints = require("lsp-inlayhints")
+ inlayhints.setup()
+ inlayhints.on_attach(client, bufnr)
end
--- Enable (broadcasting) snippet capability for completion
-local capabilities = vim.lsp.protocol.make_client_capabilities()
-capabilities.textDocument.completion.completionItem.snippetSupport = true
local lsputils = require("lspconfig").util
require("lspconfig").tsserver.setup({
on_attach = on_attach;
- root_dir = lsputils.root_pattern("package.json", "tsconfig.json",
- "jsconfig.json");
+ root_dir = lsputils.root_pattern("package.json", "tsconfig.json");
})
-require("lspconfig").denols.setup {
- on_attach = on_attach;
- init_options = { enable = true; unstable = true; config = "./deno.jsonc" };
- root_dir = vim.loop.cwd;
-}
+require("deno-nvim").setup({
+ server = {
+ root_dir = vim.loop.cwd;
+ capabilities = capabilities;
+ on_attach = on_attach;
+ settings = { enable = true; unstable = true; config = "./deno.jsonc" };
+ };
+});
require("lspconfig").rust_analyzer.setup({
- root_dir = vim.loop.cwd;
+ capabilities = capabilities;
on_attach = on_attach;
})
@@ -96,12 +97,14 @@ require("lspconfig").sqls.setup({
require("sqls").on_attach(client, bufnr)
on_attach(client, bufnr)
end;
+ capabilities = capabilities;
})
--- neovim-bin
-require"lspconfig".omnisharp.setup {
+
+require("lspconfig").omnisharp.setup({
cmd = { "omnisharp" };
on_attach = on_attach;
+ capabilities = capabilities;
-- Enables support for reading code style, naming convention and analyzer
-- settings from .editorconfig.
enable_editorconfig_support = true;
@@ -115,11 +118,11 @@ require"lspconfig".omnisharp.setup {
enable_ms_build_load_projects_on_demand = false;
-- Enables support for roslyn analyzers, code fixes and rulesets.
- enable_roslyn_analyzers = false;
+ enable_roslyn_analyzers = true;
-- Specifies whether 'using' directives should be grouped and sorted during
-- document formatting.
- organize_imports_on_format = false;
+ organize_imports_on_format = true;
-- Enables support for showing unimported types and unimported extension
-- methods in completion lists. When committed, the appropriate using
@@ -127,7 +130,7 @@ require"lspconfig".omnisharp.setup {
-- have a negative impact on initial completion responsiveness,
-- particularly for the first few completion sessions after opening a
-- solution.
- enable_import_completion = false;
+ enable_import_completion = true;
-- Specifies whether to include preview versions of the .NET SDK when
-- determining which version to use for project loading.
@@ -136,11 +139,12 @@ require"lspconfig".omnisharp.setup {
-- Only run analyzers against open files when 'enableRoslynAnalyzers' is
-- true
analyze_open_documents_only = false;
-}
+})
require("lspconfig").marksman.setup({
root_dir = vim.loop.cwd;
on_attach = on_attach;
+ capabilities = capabilities;
})
require("lspconfig").jsonls.setup({
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
index 8ea0f91..3ba6799 100644
--- a/.config/nvim/lua/plugins.lua
+++ b/.config/nvim/lua/plugins.lua
@@ -55,6 +55,7 @@ local PKGS = {
{ url = "https://github.com/folke/lsp-colors.nvim.git" };
{ url = "https://github.com/nanotee/sqls.nvim.git" };
{ url = "https://github.com/lvimuser/lsp-inlayhints.nvim.git" };
+ { url = "https://github.com/sigmaSd/deno-nvim.git" };
-- Dev container
{ url = "https://codeberg.org/esensar/nvim-dev-container.git" };