initial commit
This commit is contained in:
19
nvim/lua/configs/cmpconfig.lua
Normal file
19
nvim/lua/configs/cmpconfig.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
local cmp = require "cmp"
|
||||
local compare = cmp.config.compare
|
||||
|
||||
cmp.setup {
|
||||
sources = {
|
||||
{ name = "jupynium", priority = 1000 }, -- consider higher priority than LSP
|
||||
{ name = "nvim_lsp", priority = 100 },
|
||||
-- ...
|
||||
},
|
||||
sorting = {
|
||||
priority_weight = 1.0,
|
||||
comparators = {
|
||||
compare.score, -- Jupyter kernel completion shows prior to LSP
|
||||
compare.recently_used,
|
||||
compare.locality,
|
||||
-- ...
|
||||
},
|
||||
},
|
||||
}
|
||||
15
nvim/lua/configs/conform.lua
Normal file
15
nvim/lua/configs/conform.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
local options = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
-- css = { "prettier" },
|
||||
-- html = { "prettier" },
|
||||
},
|
||||
|
||||
-- format_on_save = {
|
||||
-- -- These options will be passed to conform.format()
|
||||
-- timeout_ms = 500,
|
||||
-- lsp_fallback = true,
|
||||
-- },
|
||||
}
|
||||
|
||||
return options
|
||||
47
nvim/lua/configs/lazy.lua
Normal file
47
nvim/lua/configs/lazy.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
return {
|
||||
defaults = { lazy = true },
|
||||
install = { colorscheme = { "nvchad" } },
|
||||
|
||||
ui = {
|
||||
icons = {
|
||||
ft = "",
|
||||
lazy = " ",
|
||||
loaded = "",
|
||||
not_loaded = "",
|
||||
},
|
||||
},
|
||||
|
||||
performance = {
|
||||
rtp = {
|
||||
disabled_plugins = {
|
||||
"2html_plugin",
|
||||
"tohtml",
|
||||
"getscript",
|
||||
"getscriptPlugin",
|
||||
"gzip",
|
||||
"logipat",
|
||||
"netrw",
|
||||
"netrwPlugin",
|
||||
"netrwSettings",
|
||||
"netrwFileHandlers",
|
||||
"matchit",
|
||||
"tar",
|
||||
"tarPlugin",
|
||||
"rrhelper",
|
||||
"spellfile_plugin",
|
||||
"vimball",
|
||||
"vimballPlugin",
|
||||
"zip",
|
||||
"zipPlugin",
|
||||
"tutor",
|
||||
"rplugin",
|
||||
"syntax",
|
||||
"synmenu",
|
||||
"optwin",
|
||||
"compiler",
|
||||
"bugreport",
|
||||
"ftplugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
68
nvim/lua/configs/lspconfig.lua
Normal file
68
nvim/lua/configs/lspconfig.lua
Normal file
@@ -0,0 +1,68 @@
|
||||
-- load defaults i.e lua_lsp
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
|
||||
local lspconfig = require "lspconfig"
|
||||
|
||||
-- EXAMPLE
|
||||
local servers = {
|
||||
"arduino_language_server",
|
||||
"ccls", --C/C++
|
||||
-- "csharp_ls",
|
||||
"cssls", --CSS
|
||||
"css_variables",
|
||||
"dartls", --Dart
|
||||
"gopls",
|
||||
"html",
|
||||
"marksman",
|
||||
-- "pylsp",
|
||||
"rust_analyzer",
|
||||
"svelte",
|
||||
"sqlls", --SQL
|
||||
"ts_ls" --TypeScript
|
||||
}
|
||||
|
||||
lspconfig.omnisharp.setup {
|
||||
cmd = { "dotnet", "/home/greg/.local/share/nvim/mason/packages/omnisharp/libexec/OmniSharp.dll"},
|
||||
}
|
||||
|
||||
-- lspconfig.rust_analyzer.setup {
|
||||
-- settings = {
|
||||
-- ['rust-analyzer'] = {
|
||||
-- diagnostics = {
|
||||
-- enabled = false
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
|
||||
lspconfig.pylsp.setup {
|
||||
cmd = { "/home/greg/.venv312/bin/pylsp" },
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
black = { enabled = true },
|
||||
-- pylint = { enabled = true, executable = "pylint", args = { "--jobs=4" } },
|
||||
pycodestyle = { enabled = false },
|
||||
pylsp_mypy = { enabled = true },
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local nvlsp = require "nvchad.configs.lspconfig"
|
||||
|
||||
-- lsps with default config
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
on_attach = nvlsp.on_attach,
|
||||
on_init = nvlsp.on_init,
|
||||
capabilities = nvlsp.capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
-- configuring single server, example: typescript
|
||||
-- lspconfig.tsserver.setup {
|
||||
-- on_attach = nvlsp.on_attach,
|
||||
-- on_init = nvlsp.on_init,
|
||||
-- capabilities = nvlsp.capabilities,
|
||||
-- }
|
||||
15
nvim/lua/configs/nvimtree.lua
Normal file
15
nvim/lua/configs/nvimtree.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
require("nvim-tree").setup({
|
||||
sort = {
|
||||
sorter = "case_sensitive",
|
||||
},
|
||||
view = {
|
||||
width = 30,
|
||||
},
|
||||
renderer = {
|
||||
group_empty = true,
|
||||
},
|
||||
filters = {
|
||||
dotfiles = true,
|
||||
gitignore = true,
|
||||
},
|
||||
})
|
||||
1
nvim/lua/configs/snippets.lua
Normal file
1
nvim/lua/configs/snippets.lua
Normal file
@@ -0,0 +1 @@
|
||||
vim.g.lua_snippets_path = vim.fn.stdpath "config" .. "/lua/lua_snippets"
|
||||
Reference in New Issue
Block a user