Installed tabnine

This commit is contained in:
Kristofers Solo
2023-06-14 17:40:26 +03:00
parent b6665c490e
commit 3bbf37a81b
51 changed files with 866 additions and 524 deletions

13
lua/plugins/cmp.lua Normal file
View File

@@ -0,0 +1,13 @@
return {
{
"hrsh7th/nvim-cmp",
-- event = "InsertEnter",
dependencies = {
"hrsh7th/cmp-buffer", -- buffer completions
"hrsh7th/cmp-path", -- path completionsplu
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-nvim-lsp",
},
}, -- The completion pluginpluguse "nvim-lua/plenary.nvim"
"saadparwaiz1/cmp_luasnip", -- snippet completions
}

View File

@@ -0,0 +1,51 @@
return {
{ "lunarvim/darkplus.nvim" },
{
"catppuccin/nvim",
lazy = false,
priority = 1000,
config = function()
require("catppuccin").setup({
flavour = "frappe",
transparent_background = true,
term_colors = true,
})
-- vim.cmd.colorscheme("catppuccin")
end,
},
{
"Mofiqul/dracula.nvim",
lazy = false,
priority = 1000,
config = function()
require("dracula").setup({
transparent_bg = true,
italic_comment = true,
})
-- vim.cmd.colorscheme("dracula")
end,
},
{
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
config = function()
require("tokyonight").setup({
style = "night",
transparent = true,
styles = {
keywords = { italic = false },
sidebars = "transparent",
floats = "transparent",
},
lualine_bold = true,
})
vim.cmd.colorscheme("tokyonight")
end,
},
{ "rebelot/kanagawa.nvim" },
{ "EdenEast/nightfox.nvim" },
{ "navarasu/onedark.nvim" },
{ "savq/melange-nvim" },
{ "bluz71/vim-nightfly-colors", name = "nightfly" },
}

6
lua/plugins/dap.lua Normal file
View File

@@ -0,0 +1,6 @@
return {
{ "mfussenegger/nvim-dap", lazy = true },
{ "rcarriga/nvim-dap-ui", lazy = true },
{ "jayp0521/mason-nvim-dap.nvim", lazy = true },
{ "ravenxrz/DAPInstall.nvim", lazy = true },
}

56
lua/plugins/general.lua Normal file
View File

@@ -0,0 +1,56 @@
return {
{ "folke/lazy.nvim" },
{ "nvim-lua/plenary.nvim" }, -- Useful lua functions used by lots of plugins
{ "windwp/nvim-autopairs" }, -- Autopairs, integrates with both cmp and treesitter
{ "numToStr/Comment.nvim" },
{ "JoosepAlviste/nvim-ts-context-commentstring" },
{ "nvim-tree/nvim-web-devicons", lazy = true },
{ "nvim-tree/nvim-tree.lua" },
{ "moll/vim-bbye" },
{ "nvim-lualine/lualine.nvim" },
{ "akinsho/toggleterm.nvim" },
{ "ahmedkhalf/project.nvim" },
{ "lewis6991/impatient.nvim" },
{ "lukas-reineke/indent-blankline.nvim" },
{ "goolord/alpha-nvim", lazy = true },
{ "andweeb/presence.nvim" },
{ "NvChad/nvim-colorizer.lua" },
{ "alvan/vim-closetag" },
{ "tpope/vim-surround" },
{ "mbbill/undotree", lazy = true },
{ "preservim/tagbar" },
{ "jghauser/mkdir.nvim", lazy = true },
{ "mtdl9/vim-log-highlighting", lazy = true },
{ "edluffy/hologram.nvim", lazy = true },
{ "folke/which-key.nvim", lazy = true },
{ "folke/todo-comments.nvim", lazy = false },
{
"folke/persistence.nvim",
event = "BufReadPre", -- this will only start session saving when an actual file was opened
module = "persistence",
},
{ "folke/zen-mode.nvim" },
{ "christoomey/vim-tmux-navigator" },
{ "ThePrimeagen/harpoon" },
{ "ThePrimeagen/vim-be-good", lazy = true },
-- Vimwiki
{ "vimwiki/vimwiki" },
{ "stevearc/oil.nvim" },
-- C++
{ "p00f/clangd_extensions.nvim", lazy = true },
{ "Civitasv/cmake-tools.nvim", lazy = true },
-- Rust
{ "Saecki/crates.nvim", lazy = true },
{ "simrat39/rust-tools.nvim", lazy = true },
-- Git
{ "lewis6991/gitsigns.nvim" },
{ "codota/tabnine-nvim", build = "./dl_binaries.sh" },
}

8
lua/plugins/lsp.lua Normal file
View File

@@ -0,0 +1,8 @@
return {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"neovim/nvim-lspconfig", -- enable LSP
"jose-elias-alvarez/null-ls.nvim", -- for formatters and linters
"jayp0521/mason-null-ls.nvim",
"RRethy/vim-illuminate",
}

9
lua/plugins/snip.lua Normal file
View File

@@ -0,0 +1,9 @@
return {
{
"L3MON4D3/LuaSnip",
run = "make install_jsregexp",
dependencies = {
"rafamadriz/friendly-snippets", -- a bunch of snippets to use
},
}, --snippet engine
}

View File

@@ -0,0 +1,9 @@
return {
"nvim-telescope/telescope.nvim",
"nvim-telescope/telescope-media-files.nvim",
"xiyaowong/telescope-emoji.nvim",
"nvim-telescope/telescope-frecency.nvim",
"nvim-telescope/telescope-ui-select.nvim",
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
"nat-418/telescope-color-names.nvim",
}

View File

@@ -0,0 +1,11 @@
return {
{
"nvim-treesitter/nvim-treesitter",
run = ":TSUpdate",
dependencies = {
"nvim-treesitter/playground",
"p00f/nvim-ts-rainbow",
"mechatroner/rainbow_csv",
},
},
}

View File

@@ -23,16 +23,17 @@ end
dashboard.section.header.val = header()
dashboard.section.buttons.val = {
dashboard.button("f", "" .. " Find file", "<cmd>Telescope find_files <cr>"),
dashboard.button("e", "" .. " New file", "<cmd>ene <BAR> startinsert <cr>"),
dashboard.button("f", "" .. " Find file", "<cmd>lua require('telescope.builtin').find_files()<cr>"),
dashboard.button("e", "" .. " New file", "<cmd>ene <BAR> startinsert<cr>"),
dashboard.button("\\", "" .. " Persistence", "<cmd>lua require('persistence').load()<cr>"),
dashboard.button("r", "" .. " Recent files", "<cmd>Telescope oldfiles <cr>"),
dashboard.button("t", "" .. " Find text", "<cmd>Telescope live_grep <cr>"),
dashboard.button("r", "" .. " Recent files", "<cmd>Telescope oldfiles<cr>"),
dashboard.button("t", "" .. " Find text", "<cmd>Telescope live_grep<cr>"),
dashboard.button(
"p",
"" .. " Find project",
"<cmd>lua require('telescope').extensions.projects.projects()<cr>"
),
dashboard.button("n", "" .. " Neorg", "<cmd>Neorg index<cr>"),
dashboard.button("g", "" .. " Git", "<cmd>lua _LAZYGIT_TOGGLE()<cr>"),
dashboard.button("c", "" .. " Config", "<cmd>e ~/.config/nvim/init.lua <cr>"),
dashboard.button("q", "" .. " Quit", "<cmd>qa<cr>"),

View File

@@ -9,15 +9,15 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
})
-- Remove statusline and tabline when in Alpha
vim.api.nvim_create_autocmd({ "User" }, {
pattern = { "AlphaReady" },
callback = function()
vim.cmd([[
set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2
set laststatus=0 | autocmd BufUnload <buffer> set laststatus=3
]])
end,
})
-- vim.api.nvim_create_autocmd({ "User" }, {
-- pattern = { "AlphaReady" },
-- callback = function()
-- vim.cmd([[
-- set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2
-- set laststatus=0 | autocmd BufUnload <buffer> set laststatus=3
-- ]])
-- end,
-- })
-- Set wrap and spell in markdown and gitcommit
vim.api.nvim_create_autocmd({ "FileType" }, {
@@ -76,29 +76,12 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
end,
})
-- Change Cursorline/Columnt color
vim.cmd([[
highlight CursorLine ctermbg=White cterm=bold guibg=#222222
highlight CursorColumn ctermbg=White cterm=bold guibg=#222222
]])
-- Autocommand that reloads waybar whenever you save the ~/.config/waybar/config file
-- vim.cmd([[
-- augroup waybar_user_config
-- autocmd!
-- autocmd BufWritePost ~/Nextcloud/solorice/.config/waybar/config silent !pkill waybar && waybar & disown <afile>
-- autocmd BufWritePost ~/Nextcloud/solorice/.config/waybar/style.css silent !pkill waybar && waybar & disown <afile>
-- augroup end
-- ]])
-- Autocommand that reloads waybar whenever you save the ~/.config/waybar/config file
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
group = vim.api.nvim_create_augroup("AutoReloadWaybar", { clear = true }),
pattern = { "**/waybar/config", "**/waybar/style.css" },
callback = function()
vim.cmd.pkill({ "waybar", bang = true })
vim.cmd.waybar()
vim.cmd("!pkill waybar && waybar & disown")
end,
})
@@ -115,8 +98,24 @@ vim.api.nvim_create_autocmd({ "BufWritePost" }, {
-- Run PackerSync on file save
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
group = vim.api.nvim_create_augroup("AutoPackerSync", { clear = true }),
pattern = { "**/plugins.lua" },
pattern = { "**/lua/plugins/*" },
callback = function()
vim.cmd.PackerSync()
require("lazy").sync()
end,
})
-- vim.api.nvim_create_autocmd({ "BufWinLeave" }, {
-- group = vim.api.nvim_create_augroup("AutoSaveFold", { clear = true }),
-- pattern = { "*.*" },
-- callback = function()
-- vim.cmd.mkview()
-- end,
-- })
--
-- vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
-- group = vim.api.nvim_create_augroup("LoadFold", { clear = true }),
-- pattern = { "*.*" },
-- callback = function()
-- vim.cmd.loadview()
-- end,
-- })

9
lua/solo/init.lua Normal file
View File

@@ -0,0 +1,9 @@
require("solo.options")
require("solo.keymaps")
require("solo.vimwiki")
require("solo.plugin")
require("solo.autocommands")
require("solo.alpha")
require("solo.autopairs")
require("solo.autosave")
require("solo.mason")

View File

@@ -21,21 +21,21 @@ keymap("n", "<C-u>", "<C-u>zz", opts)
keymap("n", "n", "nzzzv", opts)
keymap("n", "N", "Nzzzv", opts)
-- Better window navigation
keymap("n", "<C-h>", "<C-w>h", opts)
keymap("n", "<C-j>", "<C-w>j", opts)
keymap("n", "<C-k>", "<C-w>k", opts)
keymap("n", "<C-l>", "<C-w>l", opts)
-- Better window navigation with tmux
keymap("n", "<C-h>", "<cmd>TmuxNavigateLeft<cr>", opts)
keymap("n", "<C-j>", "<cmd>TmuxNavigateDown<cr>", opts)
keymap("n", "<C-k>", "<cmd>TmuxNavigateUp<cr>", opts)
keymap("n", "<C-l>", "<cmd>TmuxNavigateRight<cr>", opts)
-- Resize with arrows
keymap("n", "<C-Up>", ":resize -2<cr>", opts)
keymap("n", "<C-Down>", ":resize +2<cr>", opts)
keymap("n", "<C-Left>", ":vertical resize -2<cr>", opts)
keymap("n", "<C-Right>", ":vertical resize +2<cr>", opts)
keymap("n", "<C-Up>", "<cmd>resize -2<cr>", opts)
keymap("n", "<C-Down>", "<cmd>resize +2<cr>", opts)
keymap("n", "<C-Left>", "<cmd>vertical resize -2<cr>", opts)
keymap("n", "<C-Right>", "<cmd>vertical resize +2<cr>", opts)
-- -- Navigate buffers
keymap("n", "<S-l>", ":bnext<cr>", opts)
keymap("n", "<S-h>", ":bprevious<cr>", opts)
-- keymap("n", "<S-l>", "<cmd>bnext<cr>", opts)
-- keymap("n", "<S-h>", "<cmd>bprevious<cr>", opts)
-- Better paste
keymap("v", "p", '"_dP', opts)

View File

@@ -23,7 +23,7 @@ M.setup = function()
end
local config = {
virtual_text = true, -- virtual text
virtual_text = false, -- virtual text
signs = {
active = signs, -- show signs
},

8
lua/solo/mason/init.lua Normal file
View File

@@ -0,0 +1,8 @@
local status_ok, _ = pcall(require, "mason-lspconfig")
if not status_ok then
return
end
require("solo.mason.mason-installer")
require("solo.mason.handlers").setup()
require("solo.mason.null-ls")

View File

@@ -25,6 +25,7 @@ local servers = {
"phpactor",
"ruff_lsp",
"rust_analyzer",
"sqlls",
"taplo",
"texlab",
"tsserver",
@@ -36,8 +37,8 @@ mason_lspconfig.setup({
ensure_installed = servers,
})
local on_attach = require("user.mason.handlers").on_attach
local capabilities = require("user.mason.handlers").capabilities
local on_attach = require("solo.mason.handlers").on_attach
local capabilities = require("solo.mason.handlers").capabilities
for _, server in pairs(servers) do
local opts = {
capabilities = capabilities,
@@ -45,36 +46,36 @@ for _, server in pairs(servers) do
}
if server == "bashls" then
local bashls_opts = require("user.mason.settings.bashls")
local bashls_opts = require("solo.mason.settings.bashls")
opts = vim.tbl_deep_extend("force", bashls_opts, opts)
end
if server == "lua_ls" then
local lua_ls_opts = require("user.mason.settings.lua_ls")
local lua_ls_opts = require("solo.mason.settings.lua_ls")
opts = vim.tbl_deep_extend("force", lua_ls_opts, opts)
end
if server == "emmet_ls" then
local emmet_ls_opts = require("user.mason.settings.emmet_ls")
local emmet_ls_opts = require("solo.mason.settings.emmet_ls")
opts = vim.tbl_deep_extend("force", emmet_ls_opts, opts)
end
if server == "rust_analyzer" then
local rust_analyzer_opts = require("user.mason.settings.rust_analyzer")
local rust_analyzer_opts = require("solo.mason.settings.rust_analyzer")
opts = vim.tbl_deep_extend("force", rust_analyzer_opts, opts)
require("rust-tools").setup(opts)
goto continue
end
if server == "clangd" then
local clangd_opts = require("user.mason.settings.clangd")
local clangd_opts = require("solo.mason.settings.clangd")
opts = vim.tbl_deep_extend("force", clangd_opts, opts)
require("clangd_extensions").setup(opts)
goto continue
end
if server == "texlab" then
local texlab_opts = require("user.mason.settings.texlab")
local texlab_opts = require("solo.mason.settings.texlab")
opts = vim.tbl_deep_extend("force", texlab_opts, opts)
end

View File

@@ -29,6 +29,7 @@ mason_null_ls.setup({
"sql-formatter",
"shfmt",
"yamlfmt",
"cmakelang",
},
automatic_installation = true,
automatic_setup = true,
@@ -52,6 +53,8 @@ null_ls.setup({
}),
diagnostics.misspell,
diagnostics.mypy,
diagnostics.cmake_lint,
formatting.cmake_format,
formatting.autopep8,
formatting.beautysh,
formatting.clang_format,
@@ -82,8 +85,14 @@ null_ls.setup({
"zsh",
},
}),
formatting.sql_formatter,
-- formatting.sql_formatter.with({
-- extra_args = {
-- "-c",
-- "/home/kristofers/.config/sql/sql-formatter.json",
-- },
-- }),
formatting.stylua,
formatting.yamlfmt,
formatting.black,
},
})

View File

@@ -3,7 +3,7 @@ return {
capabilities = {
offsetEncoding = { "utf-16" },
},
on_attach = require("user.mason.handlers").on_attach,
on_attach = require("solo.mason.handlers").on_attach,
},
extensions = {
-- defaults:

View File

@@ -0,0 +1,35 @@
return {
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = "LuaJIT",
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = { "vim", "awesome", "client" },
},
-- workspace = {
-- Make the server aware of Neovim runtime files
-- library = vim.api.nvim_get_runtime_file("", true),
-- },
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
root_pattern = {
".stylua.toml",
".luarc.json",
".luarc.jsonc",
".luacheckrc",
"stylua.toml",
"selene.toml",
"selene.yml",
".git",
},
format = {
enable = false,
},
},
},
}

View File

@@ -0,0 +1,105 @@
return {
server = {
on_attach = require("solo.mason.handlers").on_attach,
capabilities = require("solo.mason.handlers").capabilities,
},
tools = {
-- how to execute terminal commands
-- options right now: termopen / quickfix
executor = require("rust-tools.executors").termopen,
-- callback to execute once rust-analyzer is done initializing the workspace
-- The callback receives one parameter indicating the `health` of the server: "ok" | "warning" | "error"
on_initialized = function()
vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave", "BufWritePost" }, {
group = vim.api.nvim_create_augroup("InitializeRustAnalyzer", { clear = true }),
pattern = { "*.rs" },
callback = function()
vim.lsp.codelens.refresh()
end,
})
end,
-- automatically call RustReloadWorkspace when writing to a Cargo.toml file.
reload_workspace_from_cargo_toml = true,
-- These apply to the default RustSetInlayHints command
inlay_hints = {
-- automatically set inlay hints (type hints)
-- default: true
auto = true,
-- Only show inlay hints for the current line
only_current_line = false,
-- whether to show parameter hints with the inlay hints or not
-- default: true
show_parameter_hints = true,
-- prefix for parameter hints
-- default: "<-"
parameter_hints_prefix = " <- ",
-- prefix for all the other hints (type, chaining)
-- default: "=>"
other_hints_prefix = " => ",
-- whether to align to the length of the longest line in the file
max_len_align = false,
-- padding from the left if max_len_align is true
max_len_align_padding = 1,
-- whether to align to the extreme right or not
right_align = false,
-- padding from the right if right_align is true
right_align_padding = 7,
-- The color of the hints
highlight = "Comment",
},
-- options same as lsp hover / vim.lsp.util.open_floating_preview()
hover_actions = {
-- the border that is used for the hover window
-- see vim.api.nvim_open_win()
border = {
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
},
-- Maximal width of the hover window. Nil means no max.
max_width = nil,
-- Maximal height of the hover window. Nil means no max.
max_height = nil,
-- whether the hover action window gets automatically focused
-- default: false
auto_focus = false,
},
-- settings for showing the crate graph based on graphviz and the dot
-- command
crate_graph = {
-- Backend used for displaying the graph
-- see: https://graphviz.org/docs/outputs/
-- default: x11
backend = "x11",
-- where to store the output, nil for no output stored (relative
-- path from pwd)
-- default: nil
output = nil,
-- true for all crates.io and external crates, false only the local
-- crates
-- default: true
full = true,
},
-- all the opts to send to nvim-lspconfig
-- these override the defaults set by rust-tools.nvim
-- see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer
server = {
-- standalone file support
-- setting it to false may improve startup time
standalone = true,
}, -- rust-analyzer options
-- debugging stuff
dap = {
adapter = {
type = "executable",
command = "codelldb",
name = "rt_lldb",
},
},
},
}

View File

@@ -9,9 +9,8 @@ local options = {
incsearch = true,
ignorecase = true, -- ignore case in search patterns
mouse = "a", -- allow the mouse to be used in neovim
pumheight = 10, -- pop up menu height
showmode = false, -- we don't need to see things like -- INSERT -- anymore
showtabline = 0, -- always show tabs
pumheight = 10, -- pop up menu height showmode = false, -- we don't need to see things like -- INSERT -- anymore
showtabline = 0, -- disable tabs
smartcase = true, -- smart case
smartindent = true, -- make indenting smarter again
splitbelow = true, -- force all horizontal splits to go below current window
@@ -20,7 +19,7 @@ local options = {
termguicolors = true, -- set term gui colors (most terminals support this)
timeoutlen = 250, -- time to wait for a mapped sequence to complete (in milliseconds)
undofile = true, -- enable persistent undo
undodir = os.getenv("XDG_DATA_HOME") .. "//nvim/undodir",
undodir = vim.fn.stdpath("data") .. "/nvim/undodir",
updatetime = 50, -- faster completion (4000ms default)
writebackup = false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
expandtab = true, -- convert tabs to spaces
@@ -40,6 +39,7 @@ local options = {
sidescrolloff = 8,
guifont = "JetBrainsMono NF:h11", -- the font used in graphical neovim applications
spell = false,
foldmethod = "manual",
}
vim.opt.fillchars.eob = " "
@@ -55,6 +55,8 @@ vim.opt.spelloptions:append("camel")
local g = vim.g
g.mapleader = " "
g.maplocalleader = " "
g.loaded_netrw = 1
g.loaded_netrwPlugin = 1
vim.opt_local.suffixesadd:prepend(".lua")
vim.opt_local.suffixesadd:prepend("init.lua")

13
lua/solo/plugin.lua Normal file
View File

@@ -0,0 +1,13 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup("plugins")

14
lua/solo/vimwiki.lua Normal file
View File

@@ -0,0 +1,14 @@
vim.g.vimwiki_list = {
{
path = "~/vimwiki",
syntax = "markdown",
ext = ".md",
},
}
vim.g.vimwiki_ext2syntax = {
[".md"] = "markdown",
[".markdown"] = "markdown",
[".mdown"] = "markdown",
}
vim.g.vimwiki_global_ext = 1

View File

@@ -1,27 +0,0 @@
local theme_status_ok, dracula = pcall(require, "dracula")
if not theme_status_ok then
return
end
dracula.setup({
-- show the '~' characters after the end of buffers
show_end_of_buffer = true, -- default false
-- use transparent background
transparent_bg = true, -- default false
-- set custom lualine background color
-- lualine_bg_color = "#44475a", -- default nil
-- set italic comment
italic_comment = true, -- default false
-- overrides the default highlights see `:h synIDattr`
overrides = {
-- Examples
-- NonText = { fg = dracula.colors().white }, -- set NonText fg to white
-- NvimTreeIndentMarker = { link = "NonText" }, -- link to NonText highlight
-- Nothing = {} -- clear highlight of Nothing
},
})
local status_ok, _ = pcall(vim.cmd.colorscheme("dracula"))
if not status_ok then
return
end

View File

@@ -1,9 +0,0 @@
require("user.options")
require("user.colorscheme")
require("user.keymaps")
require("user.autocommands")
require("user.plugins")
require("user.alpha")
require("user.autopairs")
require("user.autosave")
require("user.mason")

View File

@@ -1,8 +0,0 @@
local status_ok, _ = pcall(require, "mason-lspconfig")
if not status_ok then
return
end
require("user.mason.mason-installer")
require("user.mason.handlers").setup()
require("user.mason.null-ls")

View File

@@ -1,32 +0,0 @@
return {
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = "LuaJIT",
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = { "vim", "awesome", "client" },
},
-- workspace = {
-- -- Make the server aware of Neovim runtime files
-- library = vim.api.nvim_get_runtime_file("", true),
-- },
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
root_pattern = {
".stylua.toml",
".luarc.json",
".luarc.jsonc",
".luacheckrc",
"stylua.toml",
"selene.toml",
"selene.yml",
".git",
},
},
},
}

View File

@@ -1,22 +0,0 @@
return {
server = {
on_attach = require("user.mason.handlers").on_attach,
},
tools = {
on_initialized = function()
vim.cmd([[
autocmd BufEnter,CursorHold,InsertLeave,BufWritePost *.rs silent! lua vim.lsp.codelens.refresh()
]])
end,
},
settings = {
["rust-analyzer"] = {
lens = {
enable = true,
},
checkOnSave = {
command = "clippy",
},
},
},
}

View File

@@ -1,135 +0,0 @@
local fn = vim.fn
-- Automatically install packer
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
PACKER_BOOTSTRAP = fn.system({
"git",
"clone",
"--depth",
"1",
"https://github.com/wbthomason/packer.nvim",
install_path,
})
print("Installing packer close and reopen Neovim...")
vim.cmd([[packadd packer.nvim]])
end
-- Use a protected call so we don't error out on first use
local status_ok, packer = pcall(require, "packer")
if not status_ok then
return
end
-- Have packer use a popup window
packer.init({
display = {
open_fn = function()
return require("packer.util").float({ border = "rounded" })
end,
},
})
-- Install your plugins here
return packer.startup(function(use)
use("wbthomason/packer.nvim") -- Have packer manage itself
use("nvim-lua/plenary.nvim") -- Useful lua functions used by lots of plugins
use("windwp/nvim-autopairs") -- Autopairs, integrates with both cmp and treesitter
use("numToStr/Comment.nvim")
use("JoosepAlviste/nvim-ts-context-commentstring")
use("nvim-tree/nvim-web-devicons")
use("nvim-tree/nvim-tree.lua")
use({ "akinsho/bufferline.nvim", tag = "v3.*" })
use("moll/vim-bbye")
use("nvim-lualine/lualine.nvim")
use("akinsho/toggleterm.nvim")
use("ahmedkhalf/project.nvim")
use("lewis6991/impatient.nvim")
use("lukas-reineke/indent-blankline.nvim")
use("goolord/alpha-nvim")
use("andweeb/presence.nvim")
use("NvChad/nvim-colorizer.lua")
use("alvan/vim-closetag")
use("tpope/vim-surround")
use("mbbill/undotree")
use("folke/which-key.nvim")
use("folke/todo-comments.nvim")
use({
"folke/persistence.nvim",
event = "BufReadPre", -- this will only start session saving when an actual file was opened
module = "persistence",
})
-- Colorschemes
use("lunarvim/darkplus.nvim")
use("Mofiqul/dracula.nvim")
use("folke/tokyonight.nvim")
use("rebelot/kanagawa.nvim")
use("EdenEast/nightfox.nvim")
use("navarasu/onedark.nvim")
use("savq/melange-nvim")
use({ "bluz71/vim-nightfly-colors", as = "nightfly" })
-- Vimwiki
use("vimwiki/vimwiki")
-- cmp plugins
use("hrsh7th/nvim-cmp") -- The completion pluginpluguse "nvim-lua/plenary.nvim"
use("hrsh7th/cmp-buffer") -- buffer completions
use("hrsh7th/cmp-path") -- path completionsplu
use("hrsh7th/cmp-nvim-lua")
use("hrsh7th/cmp-nvim-lsp")
use("saadparwaiz1/cmp_luasnip") -- snippet completions
-- snippets
use({ "L3MON4D3/LuaSnip", run = "make install_jsregexp" }) --snippet engine
use("rafamadriz/friendly-snippets") -- a bunch of snippets to use
-- LSP
-- use("williamboman/nvim-lsp-installer") -- simple to use language server installer
use("williamboman/mason.nvim")
use("williamboman/mason-lspconfig.nvim")
use("neovim/nvim-lspconfig") -- enable LSP
use("jose-elias-alvarez/null-ls.nvim") -- for formatters and linters
use("jayp0521/mason-null-ls.nvim")
use("RRethy/vim-illuminate")
-- C++
use("p00f/clangd_extensions.nvim")
-- Rust
use("Saecki/crates.nvim")
use("simrat39/rust-tools.nvim")
-- Telescope
use("nvim-telescope/telescope.nvim")
use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" })
use("nvim-telescope/telescope-media-files.nvim")
use("xiyaowong/telescope-emoji.nvim")
use("nvim-telescope/telescope-frecency.nvim")
-- Treesitter
use({ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" })
use("nvim-treesitter/playground")
use("p00f/nvim-ts-rainbow")
use("mechatroner/rainbow_csv")
use("mtdl9/vim-log-highlighting")
-- Git
use("lewis6991/gitsigns.nvim")
-- DAP
use("mfussenegger/nvim-dap")
use("rcarriga/nvim-dap-ui")
use("jayp0521/mason-nvim-dap.nvim")
use("ravenxrz/DAPInstall.nvim")
use("ThePrimeagen/vim-be-good")
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins
if PACKER_BOOTSTRAP then
vim.cmd.PackerSync()
end
end)