continueing to setup nvim properly, struggling with LSP and christian chiarullis LSP setup, thinking it might be better to build from scratch?
This commit is contained in:
parent
59a3d274c7
commit
cfe7491b56
@ -1,42 +1,44 @@
|
|||||||
|
require("user.options")
|
||||||
require("user.keymaps")
|
require("user.keymaps")
|
||||||
require("user.plugins")
|
require("user.plugins")
|
||||||
require("user.colorscheme")
|
require("user.colorscheme")
|
||||||
|
require("user.lsp")
|
||||||
|
require("user.lsp-inlayhints")
|
||||||
require("user.autocommands")
|
require("user.autocommands")
|
||||||
require("user.cmp")
|
require("user.cmp")
|
||||||
require("user.navic")
|
require("user.navic")
|
||||||
require("user.lsp-inlayhints")
|
|
||||||
require("user.lsp")
|
|
||||||
require("user.telescope")
|
require("user.telescope")
|
||||||
require("user.treesitter")
|
require("user.treesitter")
|
||||||
require("user.autopairs")
|
require("user.autopairs")
|
||||||
require("user.comment")
|
require("user.comment")
|
||||||
require("user.gitsigns")
|
require("user.gitsigns")
|
||||||
require("user.nvim-tree")
|
require("user.nvim-tree")
|
||||||
|
require("user.bufferline")
|
||||||
require("user.toggleterm")
|
require("user.toggleterm")
|
||||||
require("user.project")
|
require("user.project")
|
||||||
require("user.impatient")
|
require("user.impatient")
|
||||||
require("user.indentline")
|
require("user.indentline")
|
||||||
require("user.alpha")
|
require("user.alpha")
|
||||||
require("user.whichkey")
|
require("user.whichkey")
|
||||||
require("user.hop")
|
-- require "user.hop"
|
||||||
require("user.matchup")
|
require("user.matchup")
|
||||||
require("user.numb")
|
-- require "user.numb"
|
||||||
require("user.colorizer")
|
require("user.colorizer")
|
||||||
require("user.spectre")
|
-- require "user.spectre"
|
||||||
require("user.zen-mode")
|
require("user.zen-mode")
|
||||||
require("user.neoscroll")
|
require("user.neoscroll")
|
||||||
require("user.todo-comments")
|
require("user.todo-comments")
|
||||||
require("user.symbol-outline")
|
require("user.symbol-outline")
|
||||||
require("user.notify")
|
require("user.notify")
|
||||||
require("user.ts-context")
|
require("user.ts-context")
|
||||||
|
require("user.copilot")
|
||||||
require("user.functions")
|
require("user.functions")
|
||||||
require("user.illuminate")
|
require("user.illuminate")
|
||||||
require("user.dap")
|
require("user.dap")
|
||||||
require("user.lir")
|
-- require "user.lir"
|
||||||
require "user.winbar"
|
require("user.winbar")
|
||||||
require("user.options")
|
|
||||||
require("user.nvim-webdev-icons")
|
require("user.nvim-webdev-icons")
|
||||||
require("user.fidget")
|
-- require "user.fidget"
|
||||||
require("user.browse")
|
require("user.browse")
|
||||||
require("user.surround")
|
require("user.surround")
|
||||||
require("user.harpoon")
|
require("user.harpoon")
|
||||||
|
|||||||
@ -72,97 +72,4 @@ bufferline.setup {
|
|||||||
-- return buffer_a.modified > buffer_b.modified
|
-- return buffer_a.modified > buffer_b.modified
|
||||||
-- end
|
-- end
|
||||||
},
|
},
|
||||||
highlights = {
|
|
||||||
fill = {
|
|
||||||
guifg = { attribute = "fg", highlight = "#ff0000" },
|
|
||||||
guibg = { attribute = "bg", highlight = "TabLine" },
|
|
||||||
},
|
|
||||||
background = {
|
|
||||||
guifg = { attribute = "fg", highlight = "TabLine" },
|
|
||||||
guibg = { attribute = "bg", highlight = "TabLine" },
|
|
||||||
},
|
|
||||||
|
|
||||||
-- buffer_selected = {
|
|
||||||
-- guifg = {attribute='fg',highlight='#ff0000'},
|
|
||||||
-- guibg = {attribute='bg',highlight='#0000ff'},
|
|
||||||
-- gui = 'none'
|
|
||||||
-- },
|
|
||||||
buffer_visible = {
|
|
||||||
guifg = { attribute = "fg", highlight = "TabLine" },
|
|
||||||
guibg = { attribute = "bg", highlight = "TabLine" },
|
|
||||||
},
|
|
||||||
|
|
||||||
close_button = {
|
|
||||||
guifg = { attribute = "fg", highlight = "TabLine" },
|
|
||||||
guibg = { attribute = "bg", highlight = "TabLine" },
|
|
||||||
},
|
|
||||||
close_button_visible = {
|
|
||||||
guifg = { attribute = "fg", highlight = "TabLine" },
|
|
||||||
guibg = { attribute = "bg", highlight = "TabLine" },
|
|
||||||
},
|
|
||||||
-- close_button_selected = {
|
|
||||||
-- guifg = {attribute='fg',highlight='TabLineSel'},
|
|
||||||
-- guibg ={attribute='bg',highlight='TabLineSel'}
|
|
||||||
-- },
|
|
||||||
|
|
||||||
tab_selected = {
|
|
||||||
guifg = { attribute = "fg", highlight = "Normal" },
|
|
||||||
guibg = { attribute = "bg", highlight = "Normal" },
|
|
||||||
},
|
|
||||||
tab = {
|
|
||||||
guifg = { attribute = "fg", highlight = "TabLine" },
|
|
||||||
guibg = { attribute = "bg", highlight = "TabLine" },
|
|
||||||
},
|
|
||||||
tab_close = {
|
|
||||||
-- guifg = {attribute='fg',highlight='LspDiagnosticsDefaultError'},
|
|
||||||
guifg = { attribute = "fg", highlight = "TabLineSel" },
|
|
||||||
guibg = { attribute = "bg", highlight = "Normal" },
|
|
||||||
},
|
|
||||||
|
|
||||||
duplicate_selected = {
|
|
||||||
guifg = { attribute = "fg", highlight = "TabLineSel" },
|
|
||||||
guibg = { attribute = "bg", highlight = "TabLineSel" },
|
|
||||||
gui = "italic",
|
|
||||||
},
|
|
||||||
duplicate_visible = {
|
|
||||||
guifg = { attribute = "fg", highlight = "TabLine" },
|
|
||||||
guibg = { attribute = "bg", highlight = "TabLine" },
|
|
||||||
gui = "italic",
|
|
||||||
},
|
|
||||||
duplicate = {
|
|
||||||
guifg = { attribute = "fg", highlight = "TabLine" },
|
|
||||||
guibg = { attribute = "bg", highlight = "TabLine" },
|
|
||||||
gui = "italic",
|
|
||||||
},
|
|
||||||
|
|
||||||
modified = {
|
|
||||||
guifg = { attribute = "fg", highlight = "TabLine" },
|
|
||||||
guibg = { attribute = "bg", highlight = "TabLine" },
|
|
||||||
},
|
|
||||||
modified_selected = {
|
|
||||||
guifg = { attribute = "fg", highlight = "Normal" },
|
|
||||||
guibg = { attribute = "bg", highlight = "Normal" },
|
|
||||||
},
|
|
||||||
modified_visible = {
|
|
||||||
guifg = { attribute = "fg", highlight = "TabLine" },
|
|
||||||
guibg = { attribute = "bg", highlight = "TabLine" },
|
|
||||||
},
|
|
||||||
|
|
||||||
separator = {
|
|
||||||
guifg = { attribute = "bg", highlight = "TabLine" },
|
|
||||||
guibg = { attribute = "bg", highlight = "TabLine" },
|
|
||||||
},
|
|
||||||
separator_selected = {
|
|
||||||
guifg = { attribute = "bg", highlight = "Normal" },
|
|
||||||
guibg = { attribute = "bg", highlight = "Normal" },
|
|
||||||
},
|
|
||||||
-- separator_visible = {
|
|
||||||
-- guifg = {attribute='bg',highlight='TabLine'},
|
|
||||||
-- guibg = {attribute='bg',highlight='TabLine'}
|
|
||||||
-- },
|
|
||||||
indicator_selected = {
|
|
||||||
guifg = { attribute = "fg", highlight = "LspDiagnosticsDefaultHint" },
|
|
||||||
guibg = { attribute = "bg", highlight = "Normal" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,11 +8,6 @@ if not snip_status_ok then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local tabnine_status_ok, _ = pcall(require, "user.tabnine")
|
|
||||||
if not tabnine_status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local buffer_fts = {
|
local buffer_fts = {
|
||||||
"markdown",
|
"markdown",
|
||||||
"toml",
|
"toml",
|
||||||
@ -211,7 +206,6 @@ cmp.setup {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ name = "cmp_tabnine", group_index = 2 },
|
|
||||||
{ name = "path", group_index = 2 },
|
{ name = "path", group_index = 2 },
|
||||||
{ name = "emoji", group_index = 2 },
|
{ name = "emoji", group_index = 2 },
|
||||||
{ name = "lab.quick_data", keyword_length = 4, group_index = 2 },
|
{ name = "lab.quick_data", keyword_length = 4, group_index = 2 },
|
||||||
|
|||||||
@ -3,41 +3,4 @@ if not status_ok then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local status_ok_1, _ = pcall(require, "lsp-inlayhints")
|
comment.setup {}
|
||||||
if not status_ok_1 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
comment.setup {
|
|
||||||
pre_hook = function(ctx)
|
|
||||||
-- For inlay hints
|
|
||||||
local line_start = (ctx.srow or ctx.range.srow) - 1
|
|
||||||
local line_end = ctx.erow or ctx.range.erow
|
|
||||||
require("lsp-inlayhints.core").clear(0, line_start, line_end)
|
|
||||||
|
|
||||||
if
|
|
||||||
vim.bo.filetype == "typescriptreact"
|
|
||||||
or vim.bo.filetype == "javascriptreact"
|
|
||||||
or vim.bo.filetype == "javascript"
|
|
||||||
or vim.bo.filetype == "typescript"
|
|
||||||
then
|
|
||||||
local U = require "Comment.utils"
|
|
||||||
|
|
||||||
-- Determine whether to use linewise or blockwise commentstring
|
|
||||||
local type = ctx.ctype == U.ctype.linewise and "__default" or "__multiline"
|
|
||||||
|
|
||||||
-- Determine the location where to calculate commentstring from
|
|
||||||
local location = nil
|
|
||||||
if ctx.ctype == U.ctype.blockwise then
|
|
||||||
location = require("ts_context_commentstring.utils").get_cursor_location()
|
|
||||||
elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
|
|
||||||
location = require("ts_context_commentstring.utils").get_visual_start_location()
|
|
||||||
end
|
|
||||||
|
|
||||||
return require("ts_context_commentstring.internal").calculate_commentstring {
|
|
||||||
key = type,
|
|
||||||
location = location,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|||||||
35
.config/nvim/lua/user/copilot.lua
Normal file
35
.config/nvim/lua/user/copilot.lua
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
-- For copilot.vim
|
||||||
|
-- vim.g.copilot_filetypes = {
|
||||||
|
-- ["*"] = false,
|
||||||
|
-- }
|
||||||
|
|
||||||
|
-- vim.cmd [[
|
||||||
|
-- imap <silent><script><expr> <C-A> copilot#Accept("\<CR>")
|
||||||
|
-- let g:copilot_no_tab_map = v:true
|
||||||
|
-- ]]
|
||||||
|
|
||||||
|
local status_ok, copilot = pcall(require, "copilot")
|
||||||
|
if not status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
copilot.setup {
|
||||||
|
cmp = {
|
||||||
|
enabled = true,
|
||||||
|
method = "getCompletionsCycling",
|
||||||
|
},
|
||||||
|
panel = { -- no config options yet
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
ft_disable = { "markdown" },
|
||||||
|
-- plugin_manager_path = vim.fn.stdpath "data" .. "/site/pack/packer",
|
||||||
|
server_opts_overrides = {
|
||||||
|
-- trace = "verbose",
|
||||||
|
settings = {
|
||||||
|
advanced = {
|
||||||
|
-- listCount = 10, -- #completions for panel
|
||||||
|
inlineSuggestCount = 3, -- #completions for getCompletions
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@ -5,9 +5,9 @@ local term_opts = { silent = true }
|
|||||||
local keymap = vim.api.nvim_set_keymap
|
local keymap = vim.api.nvim_set_keymap
|
||||||
|
|
||||||
--Remap space as leader key
|
--Remap space as leader key
|
||||||
keymap('n', '<Space>', '', opts)
|
keymap("n", "<Space>", "", opts)
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = " "
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
-- Modes
|
-- Modes
|
||||||
-- normal_mode = 'n',
|
-- normal_mode = 'n',
|
||||||
@ -17,81 +17,73 @@ vim.g.maplocalleader = ' '
|
|||||||
-- term_mode = 't',
|
-- term_mode = 't',
|
||||||
-- command_mode = 'c',
|
-- command_mode = 'c',
|
||||||
|
|
||||||
keymap('n', 'c', '"_c', opts)
|
keymap("n", "c", '"_c', opts)
|
||||||
|
|
||||||
-- Normal --
|
-- Normal --
|
||||||
-- 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)
|
|
||||||
|
|
||||||
-- Resize with arrows
|
-- Resize with arrows
|
||||||
keymap('n', '<C-Up>', ':resize -2<CR>', opts)
|
keymap("n", "<C-Up>", ":resize -2<CR>", opts)
|
||||||
keymap('n', '<C-Down>', ':resize +2<CR>', opts)
|
keymap("n", "<C-Down>", ":resize +2<CR>", opts)
|
||||||
keymap('n', '<C-Left>', ':vertical 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-Right>", ":vertical resize +2<CR>", opts)
|
||||||
|
|
||||||
-- Naviagate buffers
|
-- Naviagate buffers
|
||||||
keymap('n', '<S-l>', ':bnext<CR>', opts)
|
keymap("n", "<S-l>", ":BufferLineCycleNext<CR>", opts)
|
||||||
keymap('n', '<S-h>', ':bprevious<CR>', opts)
|
keymap("n", "<S-h>", ":BufferLineCyclePrev<CR>", opts)
|
||||||
|
|
||||||
-- Move text up and down
|
-- Move text up and down
|
||||||
keymap('n', '<A-j>', '<Esc>:m .+1<CR>==gi', opts)
|
keymap("n", "<A-j>", "<Esc>:m .+1<CR>==gi", opts)
|
||||||
keymap('n', '<A-k>', '<Esc>:m .-2<CR>==gi', opts)
|
keymap("n", "<A-k>", "<Esc>:m .-2<CR>==gi", opts)
|
||||||
|
|
||||||
-- Insert --
|
-- Insert --
|
||||||
-- Press jk fast to enter
|
-- Press jk fast to enter
|
||||||
keymap('i', 'jk', '<ESC>', opts)
|
keymap("i", "jk", "<ESC>", opts)
|
||||||
|
|
||||||
-- Visual --
|
-- Visual --
|
||||||
-- Stay in indent mode
|
-- Stay in indent mode
|
||||||
keymap('v', '<', '<gv', opts)
|
keymap("v", "<", "<gv", opts)
|
||||||
keymap('v', '>', '>gv', opts)
|
keymap("v", ">", ">gv", opts)
|
||||||
|
|
||||||
-- Move text up and down
|
-- Move text up and down
|
||||||
keymap('v', '<A-j>', ':m .+1<CR>==', opts)
|
keymap("v", "<A-j>", ":m .+1<CR>==", opts)
|
||||||
keymap('v', '<A-k>', ':m .-2<CR>==', opts)
|
keymap("v", "<A-k>", ":m .-2<CR>==", opts)
|
||||||
keymap('v', 'p', '"_dP', opts)
|
keymap("v", "p", '"_dP', opts)
|
||||||
keymap('v', 'P', '"_dP', opts)
|
keymap("v", "P", '"_dP', opts)
|
||||||
|
|
||||||
-- Visual Block --
|
|
||||||
-- Move text up and down
|
|
||||||
keymap('x', 'J', ':move ">+1<CR>gv-gv', opts)
|
|
||||||
keymap('x', 'K', ':move "<-2<CR>gv-gv', opts)
|
|
||||||
keymap('x', '<A-j>', ':move ">+1<CR>gv-gv', opts)
|
|
||||||
keymap('x', '<A-k>', ':move "<-2<CR>gv-gv', opts)
|
|
||||||
|
|
||||||
|
|
||||||
-- My bit's an pieces currently unsorted
|
-- My bit's an pieces currently unsorted
|
||||||
-- Spellcheck
|
-- Spellcheck
|
||||||
keymap('n', '<leader>o', ':setlocal spell! spelllang=en_us<CR>', opts)
|
keymap("n", "<leader>o", ":setlocal spell! spelllang=en_us<CR>", opts)
|
||||||
|
|
||||||
-- Tree
|
-- Tree
|
||||||
keymap('n', '<leader>n', ':NvimTreeToggle<CR>', opts)
|
keymap("n", "<leader>n", ":NvimTreeToggle<CR>", opts)
|
||||||
|
|
||||||
|
-- Telescope
|
||||||
|
keymap("n", "<leader>ff", ":Telescope find_files<CR>", opts)
|
||||||
|
keymap("n", "<leader>ft", ":Telescope live_grep<CR>", opts)
|
||||||
|
keymap("n", "<leader>fp", ":Telescope projects<CR>", opts)
|
||||||
|
keymap("n", "<leader>fb", ":Telescope buffers<CR>", opts)
|
||||||
|
|
||||||
-- Goyo
|
-- Goyo
|
||||||
keymap('n', '<leader>f', ':Goyo<CR>', opts)
|
keymap("n", "<leader>f", ":Goyo<CR>", opts)
|
||||||
|
|
||||||
-- Copy and Paste
|
-- Copy and Paste
|
||||||
keymap('n', '<C-c>', '"+y', opts)
|
keymap("n", "<C-c>", '"+y', opts)
|
||||||
keymap('n', '<C-p', '"+p', opts)
|
keymap("n", "<C-p", '"+p', opts)
|
||||||
|
|
||||||
-- Replace All is S
|
-- Replace All is S
|
||||||
vim.cmd [[nnoremap S :%s//g<Left><Left>]]
|
vim.cmd([[nnoremap S :%s//g<Left><Left>]])
|
||||||
-- keymap('n', '<S-s>', ':%s//g<Left><Left>', opts)
|
-- keymap('n', '<S-s>', ':%s//g<Left><Left>', opts)
|
||||||
|
|
||||||
-- Compile the document with default compiler script
|
-- Compile the document with default compiler script
|
||||||
vim.cmd [[map <leader>c :w! \| !compiler "<c-r>%"<CR>]]
|
vim.cmd([[map <leader>c :w! \| !compiler "<c-r>%"<CR>]])
|
||||||
-- keymap('n', '<leader>c', ':w! | !compiler <c-r>%<CR>', opts)
|
-- keymap('n', '<leader>c', ':w! | !compiler <c-r>%<CR>', opts)
|
||||||
|
|
||||||
-- Open compiled document
|
-- Open compiled document
|
||||||
keymap('n', '<leader>p', ':!opout <c-r>%<CR><CR>', opts)
|
keymap("n", "<leader>p", ":!opout <c-r>%<CR><CR>", opts)
|
||||||
|
|
||||||
-- Attempt sudo for files that require it
|
-- Attempt sudo for files that require it
|
||||||
keymap('n', 'w!!', 'execute "silent! write !sudo tee % >/dev/null" <bar> edit!', opts)
|
keymap("n", "w!!", 'execute "silent! write !sudo tee % >/dev/null" <bar> edit!', opts)
|
||||||
|
|
||||||
keymap("n", "<F11>", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
|
keymap("n", "fr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
|
||||||
keymap("n", "<F12>", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
keymap("n", "K", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
||||||
|
|
||||||
keymap("n", "<C-z>", "<cmd>ZenMode<cr>", opts)
|
keymap("n", "<C-z>", "<cmd>ZenMode<cr>", opts)
|
||||||
|
|||||||
@ -28,7 +28,8 @@ local servers = {
|
|||||||
"rust_analyzer",
|
"rust_analyzer",
|
||||||
"taplo",
|
"taplo",
|
||||||
"zk@v0.10.1",
|
"zk@v0.10.1",
|
||||||
"lemminx"
|
"lemminx",
|
||||||
|
"clangd"
|
||||||
}
|
}
|
||||||
|
|
||||||
local settings = {
|
local settings = {
|
||||||
@ -111,6 +112,11 @@ for _, server in pairs(servers) do
|
|||||||
opts = vim.tbl_deep_extend("force", solc_opts, opts)
|
opts = vim.tbl_deep_extend("force", solc_opts, opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if server == "clangd" then
|
||||||
|
local clangd_opts = require "user.lsp.settings.clangd"
|
||||||
|
opts = vim.tbl_deep_extend("force", clangd_opts, opts)
|
||||||
|
end
|
||||||
|
|
||||||
if server == "emmet_ls" then
|
if server == "emmet_ls" then
|
||||||
local emmet_ls_opts = require "user.lsp.settings.emmet_ls"
|
local emmet_ls_opts = require "user.lsp.settings.emmet_ls"
|
||||||
opts = vim.tbl_deep_extend("force", emmet_ls_opts, opts)
|
opts = vim.tbl_deep_extend("force", emmet_ls_opts, opts)
|
||||||
|
|||||||
3
.config/nvim/lua/user/lsp/settings/clangd.lua
Normal file
3
.config/nvim/lua/user/lsp/settings/clangd.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
cmd = { "clangd" }
|
||||||
|
}
|
||||||
@ -19,7 +19,7 @@ notify.setup {
|
|||||||
render = "default",
|
render = "default",
|
||||||
|
|
||||||
-- Default timeout for notifications
|
-- Default timeout for notifications
|
||||||
timeout = 175,
|
timeout = 5000,
|
||||||
|
|
||||||
-- For stages that change opacity this is treated as the highlight behind the window
|
-- For stages that change opacity this is treated as the highlight behind the window
|
||||||
-- Set this to either a highlight group or an RGB hex value e.g. "#000000"
|
-- Set this to either a highlight group or an RGB hex value e.g. "#000000"
|
||||||
|
|||||||
@ -54,14 +54,29 @@ return packer.startup(function(use)
|
|||||||
|
|
||||||
-- LSP
|
-- LSP
|
||||||
use "neovim/nvim-lspconfig" -- enable LSP
|
use "neovim/nvim-lspconfig" -- enable LSP
|
||||||
use "williamboman/nvim-lsp-installer" -- simple to use language server installer
|
-- use "williamboman/nvim-lsp-installer" -- simple to use language server installer
|
||||||
|
use "williamboman/mason.nvim"
|
||||||
|
use "williamboman/mason-lspconfig.nvim"
|
||||||
use "jose-elias-alvarez/null-ls.nvim" -- for formatters and linters
|
use "jose-elias-alvarez/null-ls.nvim" -- for formatters and linters
|
||||||
use "ray-x/lsp_signature.nvim"
|
use "ray-x/lsp_signature.nvim"
|
||||||
use "SmiteshP/nvim-navic"
|
use "SmiteshP/nvim-navic"
|
||||||
use "simrat39/symbols-outline.nvim"
|
use "simrat39/symbols-outline.nvim"
|
||||||
|
use "b0o/SchemaStore.nvim"
|
||||||
|
-- use "github/copilot.vim"
|
||||||
|
use {
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
event = { "VimEnter" },
|
||||||
|
config = function()
|
||||||
|
vim.defer_fn(function()
|
||||||
|
require "user.copilot"
|
||||||
|
end, 100)
|
||||||
|
end,
|
||||||
|
}
|
||||||
use "RRethy/vim-illuminate"
|
use "RRethy/vim-illuminate"
|
||||||
use "j-hui/fidget.nvim"
|
use "j-hui/fidget.nvim"
|
||||||
use "lvimuser/lsp-inlayhints.nvim"
|
use "lvimuser/lsp-inlayhints.nvim"
|
||||||
|
-- use "simrat39/inlay-hints.nvim"
|
||||||
|
use "https://git.sr.ht/~whynothugo/lsp_lines.nvim"
|
||||||
|
|
||||||
-- Completion
|
-- Completion
|
||||||
use "hrsh7th/nvim-cmp"
|
use "hrsh7th/nvim-cmp"
|
||||||
@ -121,6 +136,7 @@ return packer.startup(function(use)
|
|||||||
-- Tabline
|
-- Tabline
|
||||||
use "akinsho/bufferline.nvim"
|
use "akinsho/bufferline.nvim"
|
||||||
use "tiagovla/scope.nvim"
|
use "tiagovla/scope.nvim"
|
||||||
|
use "fgheng/winbar.nvim"
|
||||||
|
|
||||||
-- Statusline
|
-- Statusline
|
||||||
use "christianchiarulli/lualine.nvim"
|
use "christianchiarulli/lualine.nvim"
|
||||||
@ -165,13 +181,12 @@ return packer.startup(function(use)
|
|||||||
use "nacro90/numb.nvim"
|
use "nacro90/numb.nvim"
|
||||||
use "andymass/vim-matchup"
|
use "andymass/vim-matchup"
|
||||||
use "folke/zen-mode.nvim"
|
use "folke/zen-mode.nvim"
|
||||||
use "fgheng/winbar.nvim"
|
|
||||||
use "karb94/neoscroll.nvim"
|
use "karb94/neoscroll.nvim"
|
||||||
use "junegunn/vim-slash"
|
use "junegunn/vim-slash"
|
||||||
use 'vimwiki/vimwiki'
|
use 'vimwiki/vimwiki'
|
||||||
|
|
||||||
-- Motion
|
-- Motion
|
||||||
use "phaazon/hop.nvim"
|
-- use "phaazon/hop.nvim"
|
||||||
|
|
||||||
-- Keybinding
|
-- Keybinding
|
||||||
use "folke/which-key.nvim"
|
use "folke/which-key.nvim"
|
||||||
|
|||||||
@ -4,15 +4,15 @@ if not status_ok then
|
|||||||
end
|
end
|
||||||
|
|
||||||
local actions = require "telescope.actions"
|
local actions = require "telescope.actions"
|
||||||
telescope.load_extension "media_files"
|
|
||||||
local icons = require "user.icons"
|
local icons = require "user.icons"
|
||||||
|
|
||||||
telescope.setup {
|
telescope.setup {
|
||||||
defaults = {
|
defaults = {
|
||||||
|
|
||||||
prompt_prefix = icons.ui.Telescope .. " ",
|
prompt_prefix = icons.ui.Telescope .. "",
|
||||||
selection_caret = " ",
|
selection_caret = " ",
|
||||||
path_display = { "smart" },
|
path_display = { "smart" },
|
||||||
|
|
||||||
file_ignore_patterns = {
|
file_ignore_patterns = {
|
||||||
".git/",
|
".git/",
|
||||||
"target/",
|
"target/",
|
||||||
@ -23,9 +23,6 @@ telescope.setup {
|
|||||||
"%.sqlite3",
|
"%.sqlite3",
|
||||||
"%.ipynb",
|
"%.ipynb",
|
||||||
"node_modules/*",
|
"node_modules/*",
|
||||||
-- "%.jpg",
|
|
||||||
-- "%.jpeg",
|
|
||||||
-- "%.png",
|
|
||||||
"%.svg",
|
"%.svg",
|
||||||
"%.otf",
|
"%.otf",
|
||||||
"%.ttf",
|
"%.ttf",
|
||||||
@ -146,62 +143,4 @@ telescope.setup {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pickers = {
|
|
||||||
|
|
||||||
live_grep = {
|
|
||||||
theme = "dropdown",
|
|
||||||
},
|
|
||||||
grep_string = {
|
|
||||||
theme = "dropdown",
|
|
||||||
},
|
|
||||||
find_files = {
|
|
||||||
theme = "dropdown",
|
|
||||||
previewer = false,
|
|
||||||
},
|
|
||||||
buffers = {
|
|
||||||
theme = "dropdown",
|
|
||||||
previewer = false,
|
|
||||||
initial_mode = "normal",
|
|
||||||
},
|
|
||||||
planets = {
|
|
||||||
show_pluto = true,
|
|
||||||
show_moon = true,
|
|
||||||
},
|
|
||||||
colorscheme = {
|
|
||||||
-- enable_preview = true,
|
|
||||||
},
|
|
||||||
lsp_references = {
|
|
||||||
theme = "dropdown",
|
|
||||||
initial_mode = "normal",
|
|
||||||
},
|
|
||||||
lsp_definitions = {
|
|
||||||
theme = "dropdown",
|
|
||||||
initial_mode = "normal",
|
|
||||||
},
|
|
||||||
lsp_declarations = {
|
|
||||||
theme = "dropdown",
|
|
||||||
initial_mode = "normal",
|
|
||||||
},
|
|
||||||
lsp_implementations = {
|
|
||||||
theme = "dropdown",
|
|
||||||
initial_mode = "normal",
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
-- Default configuration for builtin pickers goes here:
|
|
||||||
-- picker_name = {
|
|
||||||
-- picker_config_key = value,
|
|
||||||
-- ...
|
|
||||||
-- }
|
|
||||||
-- Now the picker_config_key will be applied every time you call this
|
|
||||||
-- builtin picker
|
|
||||||
},
|
|
||||||
extensions = {
|
|
||||||
media_files = {
|
|
||||||
-- filetypes whitelist
|
|
||||||
-- defaults to {"png", "jpg", "mp4", "webm", "pdf"}
|
|
||||||
filetypes = { "png", "webp", "jpg", "jpeg" },
|
|
||||||
find_cmd = "rg", -- find command (defaults to `fd`)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,7 +95,6 @@ local m_mappings = {
|
|||||||
m = { '<cmd>lua require("harpoon.mark").add_file()<cr>', "Harpoon" },
|
m = { '<cmd>lua require("harpoon.mark").add_file()<cr>', "Harpoon" },
|
||||||
["."] = { '<cmd>lua require("harpoon.ui").nav_next()<cr>', "Harpoon Next" },
|
["."] = { '<cmd>lua require("harpoon.ui").nav_next()<cr>', "Harpoon Next" },
|
||||||
[","] = { '<cmd>lua require("harpoon.ui").nav_prev()<cr>', "Harpoon Prev" },
|
[","] = { '<cmd>lua require("harpoon.ui").nav_prev()<cr>', "Harpoon Prev" },
|
||||||
l = { "<cmd>lua require('user.bfs').open()<cr>", "Buffers" },
|
|
||||||
j = { "<cmd>silent BookmarkNext<cr>", "Next" },
|
j = { "<cmd>silent BookmarkNext<cr>", "Next" },
|
||||||
s = { "<cmd>Telescope harpoon marks<cr>", "Search Files" },
|
s = { "<cmd>Telescope harpoon marks<cr>", "Search Files" },
|
||||||
k = { "<cmd>silent BookmarkPrev<cr>", "Prev" },
|
k = { "<cmd>silent BookmarkPrev<cr>", "Prev" },
|
||||||
|
|||||||
@ -71,7 +71,7 @@ import XMonad.Util.SpawnOnce
|
|||||||
-- A simple way to switch between desktop and laptop related things
|
-- A simple way to switch between desktop and laptop related things
|
||||||
-- Don't forget this exists, I have previously confused myself by doing so.
|
-- Don't forget this exists, I have previously confused myself by doing so.
|
||||||
isLaptop :: Bool
|
isLaptop :: Bool
|
||||||
isLaptop = True
|
isLaptop = False
|
||||||
|
|
||||||
|
|
||||||
--THEME
|
--THEME
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user