mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Compare commits
3 Commits
fc8175d32d
...
1608a36dd3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1608a36dd3 | ||
|
|
450f058da5 | ||
|
|
e2f348cb37 |
@ -9,7 +9,7 @@ require("bufferline").setup {
|
|||||||
icon = "▎", -- this should be omitted if indicator style is not 'icon'
|
icon = "▎", -- this should be omitted if indicator style is not 'icon'
|
||||||
style = "icon",
|
style = "icon",
|
||||||
},
|
},
|
||||||
buffer_close_icon = "",
|
buffer_close_icon = "",
|
||||||
modified_icon = "●",
|
modified_icon = "●",
|
||||||
close_icon = "",
|
close_icon = "",
|
||||||
left_trunc_marker = "",
|
left_trunc_marker = "",
|
||||||
|
|||||||
@ -2,7 +2,7 @@ local api = vim.api
|
|||||||
local keymap = vim.keymap
|
local keymap = vim.keymap
|
||||||
local dashboard = require("dashboard")
|
local dashboard = require("dashboard")
|
||||||
|
|
||||||
conf = {}
|
local conf = {}
|
||||||
conf.header = {
|
conf.header = {
|
||||||
" ",
|
" ",
|
||||||
" ",
|
" ",
|
||||||
@ -21,25 +21,25 @@ conf.header = {
|
|||||||
|
|
||||||
conf.center = {
|
conf.center = {
|
||||||
{
|
{
|
||||||
icon = " ",
|
icon = " ",
|
||||||
desc = "Find File ",
|
desc = "Find File ",
|
||||||
action = "Leaderf file --popup",
|
action = "Leaderf file --popup",
|
||||||
key = "<Leader> f f",
|
key = "<Leader> f f",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon = " ",
|
icon = " ",
|
||||||
desc = "Recently opened files ",
|
desc = "Recently opened files ",
|
||||||
action = "Leaderf mru --popup",
|
action = "Leaderf mru --popup",
|
||||||
key = "<Leader> f r",
|
key = "<Leader> f r",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon = " ",
|
icon = " ",
|
||||||
desc = "Project grep ",
|
desc = "Project grep ",
|
||||||
action = "Leaderf rg --popup",
|
action = "Leaderf rg --popup",
|
||||||
key = "<Leader> f g",
|
key = "<Leader> f g",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon = " ",
|
icon = " ",
|
||||||
desc = "Open Nvim config ",
|
desc = "Open Nvim config ",
|
||||||
action = "tabnew $MYVIMRC | tcd %:p:h",
|
action = "tabnew $MYVIMRC | tcd %:p:h",
|
||||||
key = "<Leader> e v",
|
key = "<Leader> e v",
|
||||||
@ -51,7 +51,7 @@ conf.center = {
|
|||||||
key = "e",
|
key = "e",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon = " ",
|
icon = " ",
|
||||||
desc = "Quit Nvim ",
|
desc = "Quit Nvim ",
|
||||||
-- desc = "Quit Nvim ",
|
-- desc = "Quit Nvim ",
|
||||||
action = "qa",
|
action = "qa",
|
||||||
|
|||||||
@ -114,6 +114,15 @@ local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
|||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
if utils.executable("pylsp") then
|
if utils.executable("pylsp") then
|
||||||
|
local venv_path = os.getenv('VIRTUAL_ENV')
|
||||||
|
local py_path = nil
|
||||||
|
-- decide which python executable to use for mypy
|
||||||
|
if venv_path ~= nil then
|
||||||
|
py_path = venv_path .. "/bin/python3"
|
||||||
|
else
|
||||||
|
py_path = vim.g.python3_host_prog
|
||||||
|
end
|
||||||
|
|
||||||
lspconfig.pylsp.setup {
|
lspconfig.pylsp.setup {
|
||||||
on_attach = custom_attach,
|
on_attach = custom_attach,
|
||||||
settings = {
|
settings = {
|
||||||
@ -129,7 +138,12 @@ if utils.executable("pylsp") then
|
|||||||
pyflakes = { enabled = false },
|
pyflakes = { enabled = false },
|
||||||
pycodestyle = { enabled = false },
|
pycodestyle = { enabled = false },
|
||||||
-- type checker
|
-- type checker
|
||||||
pylsp_mypy = { enabled = true, report_progress = true, live_mode = false },
|
pylsp_mypy = {
|
||||||
|
enabled = true,
|
||||||
|
overrides = { "--python-executable", py_path, true },
|
||||||
|
report_progress = true,
|
||||||
|
live_mode = false
|
||||||
|
},
|
||||||
-- auto-completion options
|
-- auto-completion options
|
||||||
jedi_completion = { fuzzy = true },
|
jedi_completion = { fuzzy = true },
|
||||||
-- import sorting
|
-- import sorting
|
||||||
@ -233,10 +247,10 @@ if utils.executable("lua-language-server") then
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Change diagnostic signs.
|
-- Change diagnostic signs.
|
||||||
fn.sign_define("DiagnosticSignError", { text = "✗", texthl = "DiagnosticSignError" })
|
fn.sign_define("DiagnosticSignError", { text = '🆇', texthl = "DiagnosticSignError" })
|
||||||
fn.sign_define("DiagnosticSignWarn", { text = "!", texthl = "DiagnosticSignWarn" })
|
fn.sign_define("DiagnosticSignWarn", { text = '⚠️', texthl = "DiagnosticSignWarn" })
|
||||||
fn.sign_define("DiagnosticSignInformation", { text = "", texthl = "DiagnosticSignInfo" })
|
fn.sign_define("DiagnosticSignInfo", { text = 'ℹ️', texthl = "DiagnosticSignInfo" })
|
||||||
fn.sign_define("DiagnosticSignHint", { text = "", texthl = "DiagnosticSignHint" })
|
fn.sign_define("DiagnosticSignHint", { text = '', texthl = "DiagnosticSignHint" })
|
||||||
|
|
||||||
-- global config for diagnostic
|
-- global config for diagnostic
|
||||||
diagnostic.config {
|
diagnostic.config {
|
||||||
|
|||||||
@ -130,6 +130,7 @@ require("lualine").setup {
|
|||||||
{
|
{
|
||||||
"diagnostics",
|
"diagnostics",
|
||||||
sources = { "nvim_diagnostic" },
|
sources = { "nvim_diagnostic" },
|
||||||
|
symbols = {error = '🆇 ', warn = '⚠️ ', info = 'ℹ️ ', hint = ' '},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user