Can someone share a setup for colors similar to those in VSCode for Python? #255
Replies: 4 comments 2 replies
-
Do you have Tree-sitter installed and setup? Out of the box Python should look like the screenshot in the README. |
Beta Was this translation helpful? Give feedback.
-
This is my nvim-treesitter. Is it the correct plugin? {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = {
"javascript",
"typescript",
"lua",
"vim",
"vimdoc",
"query",
"heex",
"eex",
"jq",
"dockerfile",
"yaml",
"json",
"html",
"tsx",
"bash",
"markdown",
},
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = "<C-CR>",
node_decremental = "<bs>",
},
},
textobjects = {
select = {
enable = true,
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["aa"] = "@parameter.outer",
["ia"] = "@parameter.inner",
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
},
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
["]m"] = "@function.outer",
["]]"] = "@class.outer",
},
goto_next_end = {
["]M"] = "@function.outer",
["]["] = "@class.outer",
},
goto_previous_start = {
["[m"] = "@function.outer",
["[["] = "@class.outer",
},
goto_previous_end = {
["[M"] = "@function.outer",
["[]"] = "@class.outer",
},
},
swap = {
enable = true,
swap_next = {
["<leader>p"] = "@parameter.inner",
},
swap_previous = {
["<leader>ps"] = "@parameter.inner",
},
},
},
})
end,
}
|
Beta Was this translation helpful? Give feedback.
-
Ah after add python into ensure_installed theme has changed, but still not like vscode T_T |
Beta Was this translation helpful? Give feedback.
-
Thank @olimorris for helping me, return {
"olimorris/onedarkpro.nvim",
priority = 1000, -- Ensure it loads first
opts = {
options = {
cursorline = false, -- Use cursorline highlighting?
transparency = true, -- Use a transparent background?
terminal_colors = false, -- Use the theme's colors for Neovim's :terminal?
lualine_transparency = true, -- Center bar transparency?
highlight_inactive_windows = false, -- When the window is out of focus, change the normal background?
},
filetypes = {
python = true,
javascript = true,
},
plugins = {
dashboard = true,
flash_nvim = true,
telescope = true,
nvim_lsp = true,
indentline = true,
nvim_cmp = true,
treesitter = true,
which_key = true,
},
highlights = {
-- Visual = { bg = "${light_gray}", italic = true }
["@constant.javascript"] = { fg = "${orange}" },
["@constant.python"] = { fg = "${blue}" },
},
styles = {
}
}
} |
Beta Was this translation helpful? Give feedback.
-
Nvim:
VSCode:
Beta Was this translation helpful? Give feedback.
All reactions