Many more changes! Holy moly. Finally got LSP and CMP working as expected.
This commit is contained in:
@ -135,8 +135,15 @@ function _G.trim_trailing_whitespaces()
|
||||
end
|
||||
end
|
||||
|
||||
-- Correctly set $VIRTUAL_ENV for Python venvs.
|
||||
if vim.fn.exists("$VIRTUAL_ENV") == 1 then
|
||||
vim.g.python3_host_prog = vim.fn.substitute(vim.fn.system("pyenv which python3 | head -n2 | tail -n1"), "\n", "", "g")
|
||||
else
|
||||
vim.g.python3_host_prog = vim.fn.substitute(vim.fn.system("which python3"), "\n", "", "g")
|
||||
end
|
||||
|
||||
-- see https://github.com/hrsh7th/nvim-cmp/wiki/Menu-Appearance#how-to-add-visual-studio-code-dark-theme-colors-to-the-menu
|
||||
--[[vim.cmd[[
|
||||
vim.cmd[[
|
||||
highlight! link CmpItemMenu Comment
|
||||
" gray
|
||||
highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080
|
||||
@ -155,7 +162,6 @@ end
|
||||
highlight! CmpItemKindProperty guibg=NONE guifg=#D4D4D4
|
||||
highlight! CmpItemKindUnit guibg=NONE guifg=#D4D4D4
|
||||
]]
|
||||
--]]
|
||||
|
||||
require('core/keymaps')
|
||||
vim.cmd[[colorscheme moonlight]]
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "0b4950a237ce441a6a3a947d501622453f6860ea" },
|
||||
"adjacent.nvim": { "branch": "main", "commit": "a555ab92d61aa6fbbfa1bfaef4633b663563f04e" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "5f211a1597b06be24b1600d72a62b94cab1e2df9" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "331d55eb18d6e42bda4a183863a681be3ee11370" },
|
||||
"auto-hlsearch.nvim": { "branch": "main", "commit": "8f28246d53e9478717ca3b51c8112083fbebd7e3" },
|
||||
"barbar.nvim": { "branch": "master", "commit": "dd852401ee902745b67fc09a83d113b3fe82a96f" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
@ -18,13 +18,13 @@
|
||||
"dracula.nvim": { "branch": "main", "commit": "9fe831e685a76e1a1898a694623b33247c4d036c" },
|
||||
"f-string-toggle.nvim": { "branch": "main", "commit": "383ca5c08ed001f7c1632ba752c14e7bb88ce6ed" },
|
||||
"feline.nvim": { "branch": "master", "commit": "d48b6f92c6ccdd6654c956f437be49ea160b5b0c" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "d927caa075df63bf301d92f874efb72fd22fd3b4" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "bf6b0bbc527c546ecd6af2bb9fcd06864ae0852c" },
|
||||
"glow.nvim": { "branch": "main", "commit": "5b38fb7b6e806cac62707a4aba8c10c5f14d5bb5" },
|
||||
"headlines.nvim": { "branch": "master", "commit": "74a083a3c32a08be24f7dfcc6f448ecf47857f46" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
|
||||
"lsp-colors.nvim": { "branch": "main", "commit": "2bbe7541747fd339bdd8923fc45631a09bb4f1e5" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" },
|
||||
@ -38,8 +38,6 @@
|
||||
"mini.trailspace": { "branch": "main", "commit": "c41ab1035d184ff20c1aebd76639320c055afebe" },
|
||||
"mkdnflow.nvim": { "branch": "main", "commit": "a728a3533bb57502fdfd6fdb4e5839fc87430edc" },
|
||||
"moonfly": { "branch": "master", "commit": "1e81cbb88a34c41572fde43cd633bd6d60727274" },
|
||||
"neorg": { "branch": "main", "commit": "20502e50e9087248f6f8ed8d29fae9c849c1c77f" },
|
||||
"neorg-templates": { "branch": "main", "commit": "1078ced1f995cc053cdb10b51bd5e5dd5d76f78a" },
|
||||
"neoscroll.nvim": { "branch": "master", "commit": "4bc0212e9f2a7bc7fe7a6bceb15b33e39f0f41fb" },
|
||||
"neovim": { "branch": "main", "commit": "e29002cbee4854a9c8c4b148d8a52fae3176070f" },
|
||||
"nightfox.nvim": { "branch": "main", "commit": "e886e39e592e89f316536a6f070365a9d88901c9" },
|
||||
@ -50,10 +48,10 @@
|
||||
"nvim-dap": { "branch": "master", "commit": "31e1ece773e10448dcb616d5144290946a6264b7" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "499314f76fa6e8f82f7cfd116578906d61ba2560" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "0517d8522dcec286b1dba47aa3ee1ed8f523aed6" },
|
||||
"nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "ec33d4befa74205e09baf8bb4f90be5be754e6ab" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "95d02cdafe704fa5b86eac81f2eb1de3d8f52330" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "cc56e1f093868892fc7fea68ac3a51f5ffc38728" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "bc11ee2498de2310de5776477dd9dce65d03b464" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "0dbe561ae023f02c2fb772b879e905055b939ce3" },
|
||||
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||
@ -64,7 +62,7 @@
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
|
||||
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "851c0997d55601f2afd7290db0f90dc364e29f58" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "c1a2af0af69e80e14e6b226d3957a064cd080805" },
|
||||
"tmux.nvim": { "branch": "main", "commit": "cb12b31a6b8aea1b39e4735ed70f7c73c2a938b0" },
|
||||
"tmux.nvim": { "branch": "main", "commit": "673782b74a6055d430d3f5148a033edd99e5519f" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "b90a1381e9b5b8596f49070ee86c71db267ac868" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "9a01eada39558dc3243278e6805d90e8dff45dc0" },
|
||||
|
||||
@ -6,12 +6,12 @@ local map = vim.api.nvim_set_keymap
|
||||
local default_opts = { noremap = true, silent = true }
|
||||
|
||||
-- Fast saving with <leader> and s
|
||||
map('n', '<leader>s', ':w<CR>', default_opts)
|
||||
map('n', '<leader>a', ':w|:luafile %<CR>', default_opts)
|
||||
map('n', '<leader>aa', ':w|:luafile %<CR> |:Lazy<CR>', default_opts)
|
||||
map('i', '<leader>s', '<C-c>:w<CR>', default_opts)
|
||||
-- map('n', '<leader>s', ':w<CR>', default_opts)
|
||||
-- map('n', '<leader>a', ':w|:luafile %<CR>', default_opts)
|
||||
-- map('n', '<leader>aa', ':w|:luafile %<CR> |:Lazy<CR>', default_opts)
|
||||
-- map('i', '<leader>s', '<C-c>:w<CR>', default_opts)
|
||||
-- Python Script that saves the file & moves Todos to my Todolist.
|
||||
map('n', '<leader>sd', ':w|:! python3 ~/Documents/Northpass/Scripts/TodoMD/todo.py %<CR>', default_opts)
|
||||
-- map('n', '<leader>sd', ':w|:! python3 ~/Documents/Northpass/Scripts/TodoMD/todo.py %<CR>', default_opts)
|
||||
|
||||
-- Neovim Tab Navgation via Vem-Tabline
|
||||
map('n', '<leader>t', ':tabnew<CR>', default_opts)
|
||||
|
||||
@ -12,19 +12,25 @@ return {
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗"
|
||||
}
|
||||
}
|
||||
})
|
||||
end,
|
||||
},
|
||||
{ 'williamboman/mason-lspconfig.nvim',
|
||||
config = function() require("mason-lspconfig").setup{} end,
|
||||
}
|
||||
})
|
||||
end,
|
||||
},
|
||||
{ 'neovim/nvim-lspconfig' },
|
||||
{ 'williamboman/mason-lspconfig.nvim',
|
||||
config = function() require("mason-lspconfig").setup{} end,
|
||||
},
|
||||
{ 'neovim/nvim-lspconfig' },
|
||||
|
||||
{
|
||||
{
|
||||
'L3MON4D3/LuaSnip', version = "2.0.0",
|
||||
build = "make install_jsregexp",
|
||||
dependencies = { "friendly-snippets" },
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip.loaders.from_vscode").lazy_load({
|
||||
paths = { "~/.dotfiles/nvim/.config/nvim/lua/custom_snippets/" }
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{"ellisonleao/glow.nvim", config = function() require("glow").setup() end },
|
||||
@ -74,7 +80,18 @@ return {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
require("nvim-tree").setup {}
|
||||
require("nvim-tree").setup({
|
||||
sort_by = "case_sensitive",
|
||||
view = {
|
||||
width = 30,
|
||||
},
|
||||
renderer = {
|
||||
group_empty = true,
|
||||
},
|
||||
filters = {
|
||||
dotfiles = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
@ -247,7 +264,6 @@ return {
|
||||
},
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
-- Text, Icons, Symbols
|
||||
----------------------------------------------------------
|
||||
|
||||
@ -257,10 +273,15 @@ return {
|
||||
require('symbols-outline').setup()
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"j-hui/fidget.nvim",
|
||||
tag = "legacy",
|
||||
event = "LspAttach",
|
||||
opts = {
|
||||
-- options
|
||||
},
|
||||
},
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
'folke/lsp-colors.nvim',
|
||||
'Mofiqul/dracula.nvim',
|
||||
'karb94/neoscroll.nvim',
|
||||
|
||||
-- Allow Popups for Telescope etc
|
||||
@ -311,12 +332,11 @@ return {
|
||||
},
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
-- Various Color Schemes, Dashboard, etc
|
||||
-----------------------------------------------------------
|
||||
|
||||
{'ray-x/starry.nvim', setup=function()
|
||||
end},
|
||||
'Mofiqul/dracula.nvim',
|
||||
'ray-x/starry.nvim',
|
||||
'rose-pine/neovim',
|
||||
'EdenEast/nightfox.nvim',
|
||||
'catppuccin/nvim',
|
||||
|
||||
@ -15,14 +15,12 @@ return {
|
||||
debug = true,
|
||||
sources = {
|
||||
null_ls.builtins.completion.spell,
|
||||
null_ls.builtins.diagnostics.codespell,
|
||||
null_ls.builtins.diagnostics.markdownlint.with({ extra_args = { "--disable", "MD024", "MD013", "--" }
|
||||
,}),
|
||||
null_ls.builtins.diagnostics.markdownlint.with({
|
||||
extra_args = { "--disable", "MD024", "MD013", "--" }}),
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.diagnostics.ruff,
|
||||
-- null_ls.builtins.diagnostics.pylama,
|
||||
-- null_ls.builtins.diagnostics.pylint,
|
||||
-- null_ls.builtins.diagnostics.pycodestyle,
|
||||
null_ls.builtins.completion.luasnip,
|
||||
null_ls.builtins.code_actions.gitsigns,
|
||||
null_ls.builtins.hover.dictionary,
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
@ -15,27 +15,6 @@ return {
|
||||
name_is_source = true,
|
||||
conceal = true,
|
||||
},
|
||||
new_file_template = {
|
||||
use_template = true,
|
||||
template = [[
|
||||
# {{ title }}
|
||||
* Date: {{ date }}
|
||||
* Customer: {{ customer }}
|
||||
|
||||
## Meeting Notes:]],
|
||||
placeholders = {
|
||||
before = {
|
||||
date = function()
|
||||
return os.date("%A, %B %d, %Y") -- Wednesday, March 1, 2023
|
||||
end
|
||||
},
|
||||
after = {
|
||||
customer = function()
|
||||
return vim.fn.expand('%:p:h:t')
|
||||
end
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
return {
|
||||
"nvim-neorg/neorg",
|
||||
build = ":Neorg sync-parsers",
|
||||
dependencies = {
|
||||
{ "nvim-lua/plenary.nvim",
|
||||
"pysan3/neorg-templates", dependencies = { "L3MON4D3/LuaSnip" },
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("neorg").setup {
|
||||
load = {
|
||||
["core.defaults"] = {},
|
||||
["core.concealer"] = {},
|
||||
["core.integrations.nvim-cmp"] = {},
|
||||
["core.integrations.treesitter"] = {},
|
||||
["core.highlights"] = {},
|
||||
["core.export"] = {},
|
||||
["core.mode"] = {},
|
||||
["core.itero"] = {},
|
||||
["core.keybinds"] = {
|
||||
config = {
|
||||
hook = function(keybinds)
|
||||
keybinds.remap_key("norg", "n", "<M-CR>", "<S-tab>")
|
||||
end,
|
||||
}
|
||||
},
|
||||
["core.completion"] = {
|
||||
config = {
|
||||
engine = "nvim-cmp"
|
||||
},
|
||||
},
|
||||
["core.dirman"] = {
|
||||
config = {
|
||||
workspaces = {
|
||||
customer_notes = "~/Documents/Work/Customer_Notes/",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
@ -29,7 +29,7 @@ return {
|
||||
-- Load snippet support
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
|
||||
@ -38,6 +38,19 @@ return {
|
||||
--completeopt = 'menu,menuone,noselect'
|
||||
keyword_length = 1
|
||||
},
|
||||
window = {
|
||||
completion = {
|
||||
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
|
||||
col_offset = -3,
|
||||
side_padding = 0,
|
||||
border = 'rounded',
|
||||
scrollbar = '+',
|
||||
},
|
||||
documentation = {
|
||||
border = 'rounded',
|
||||
scrollbar = '|',
|
||||
}
|
||||
},
|
||||
|
||||
-- Key mapping
|
||||
mapping = {
|
||||
@ -78,6 +91,7 @@ return {
|
||||
{ name = 'nvim-lsp', keyword_length = 1 },
|
||||
{ name = 'luasnip', keyword_length = 1 },
|
||||
{ name = 'path' },
|
||||
{ name = 'calc' },
|
||||
{ name = 'nvim_lsp_signature_help' },
|
||||
{ name = 'buffer', keyword_length = 1 },
|
||||
},
|
||||
@ -104,6 +118,12 @@ return {
|
||||
cmp.config.compare.kind,
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
-- Set up lspconfig.
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
-- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
|
||||
require'lspconfig'.pylsp.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
@ -3,12 +3,35 @@ return {
|
||||
config = function()
|
||||
-- Setup language servers.
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.pyright.setup {}
|
||||
lspconfig.pyright.setup {}
|
||||
lspconfig.pylsp.setup {}
|
||||
-- Server-specific settings. See `:help lspconfig-setup`
|
||||
settings = {
|
||||
['pyright'] = {},
|
||||
},
|
||||
}
|
||||
['pyright'] = {
|
||||
cmd = {"pyright-langserver", "--stdio"},
|
||||
root_dir = function(fname)
|
||||
local root_files = {
|
||||
'pyproject.toml',
|
||||
'setup.py',
|
||||
'setup.cfg',
|
||||
'requirements.txt',
|
||||
'Pipfile',
|
||||
}
|
||||
return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname)
|
||||
end,
|
||||
settings = {
|
||||
pylsp = {
|
||||
configurationSources = {"pylint"},
|
||||
plugins = {
|
||||
pylint = { enabled = true },
|
||||
flake8 = { enabled = false },
|
||||
pycodestyle = { enabled = false },
|
||||
pyflakes = { enabled = false },
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
-- Global mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
|
||||
|
||||
51
zsh/.zshrc
51
zsh/.zshrc
@ -4,20 +4,28 @@
|
||||
export LC_ALL=en_US.UTF-8
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
plugins=(
|
||||
zsh-autosuggestions,
|
||||
git,
|
||||
wakatime,
|
||||
brew,
|
||||
npm,
|
||||
z,
|
||||
zsh-syntax-highlighting,
|
||||
vi-mode,
|
||||
)
|
||||
#plugins=(
|
||||
# zsh-autosuggestions,
|
||||
# git,
|
||||
# wakatime,
|
||||
# brew,
|
||||
# npm,
|
||||
# z,
|
||||
# zsh-syntax-highlighting,
|
||||
# vi-mode,
|
||||
#)
|
||||
plug "jeffreytse/zsh-vi-mode"
|
||||
plug "wbingli/zsh-wakatime"
|
||||
|
||||
|
||||
# Zsh Autosuggestion Config
|
||||
source ~/.dotfiles/zsh/zsh-autosuggestions/
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#ff00ff,bg=cyan,bold,underline"
|
||||
#source ~/.dotfiles/zsh/zsh-autosuggestions/
|
||||
#ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#ff00ff,bg=cyan,bold,underline"
|
||||
plug "zap-zsh/supercharge"
|
||||
plug "zsh-users/zsh-autosuggestions"
|
||||
|
||||
# Example install of a plugin pinned to specifc commit or branch, just pass the git reference
|
||||
plug "zsh-users/zsh-syntax-highlighting" "122dc46"
|
||||
|
||||
# User configuration
|
||||
|
||||
@ -31,7 +39,20 @@ export VISUAL='nvim'
|
||||
export PYTHONPATH="/opt/homebrew/bin/python3:$PYTHONPATH"
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init -)"
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
|
||||
# Function to Correctly Source $VIRTUAL_ENV for Neovim
|
||||
function nvimvenv {
|
||||
if [[ -e "$VIRTUAL_ENV" && -f "$VIRTUAL_ENV/bin/activate" ]]; then
|
||||
source "$VIRTUAL_ENV/bin/activate"
|
||||
command nvim "$@"
|
||||
deactivate
|
||||
else
|
||||
command nvim "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
alias nvim=nvimvenv
|
||||
|
||||
# alias nvim-minimal="NVIM_APPNAME=Minivim nvim"
|
||||
# alias nvim-arduino="NVIM_APPNAME=Arduino nvim"
|
||||
@ -51,9 +72,9 @@ eval "$(pyenv init -)"
|
||||
|
||||
# source /Users/normrasmussen/.docker/init-zsh.sh || true # Added by Docker Desktop
|
||||
|
||||
export PATH="$PATH:$HOME/.rvm/bin"
|
||||
# export PATH="$PATH:$HOME/.rvm/bin"
|
||||
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
export PATH="/opt/homebrew/sbin:$PATH"
|
||||
eval "$(starship init zsh)"
|
||||
export PATH="/opt/homebrew/bin:$PATH"
|
||||
eval "$(starship init zsh)"
|
||||
|
||||
Reference in New Issue
Block a user