I've been wondering whether nationalism is inherently a left-wing or a right-wing ideology.
Historically, the answer doesn't seem obvious. During the French Revolution, nationalism was largely associated with the Left. It challenged monarchy, aristocratic privilege, and the old dynastic order by arguing that sovereignty belonged to the nation rather than to a king. In that context, nationalism was a revolutionary and emancipatory force.
Today, though, the picture seems much more complicated.
In many countries, nationalism is primarily associated with the Right: conservative movements, anti-immigration politics, cultural traditionalism, or ethnic conceptions of the nation. Examples could include much of the contemporary European far right or various forms of right-wing populism.
At the same time, there are clearly left-wing nationalist movements. Irish republicanism is probably one of the best-known examples, where nationalism has often been intertwined with socialism, anti-colonialism, and labor politics. Similar patterns can be found in other anti-colonial or national liberation movements.
What's even more interesting is that the same national movement can contain both right-wing and left-wing currents.
Ukraine seems like a good example. There is an explicitly right-wing nationalist current, represented by groups such as Azov and similar organizations, emphasizing military traditions, conservative values, and ethnic nationalism.
But there is also a distinctly left-leaning current of Ukrainian nationalism, often represented by younger activists and parts of civil society. Their understanding of national identity is frequently combined with feminism, LGBTQ rights, decolonial theory, and other progressive ideas. Ukrainian feminism, for example, draws on a long tradition of influential women writers and intellectuals, while decolonial studies have become increasingly important in interpreting Ukraine's relationship with the Russian Empire and the Soviet Union.
Am I missing something here, or is nationalism better understood as a politically neutral framework that can be adopted by both the left and the right?
I don’t think this question is useful for a dialectical materialist understanding. Whether nationalism has a political orientation reduces to the question whether the nation under analysis has a political orientation. Given that the answer hinges on what constitutes the nation, there isn’t any abstract answer to your question. In one country at the same time there can be multiple “nationalist” movements, each in absolute contradiction with the other. One wants to establish bourgeois or white rule, the other wants to establish political power for the proletariat or indigenous peoples. It does not help us understand these historical movements to dwell on contemplation of abstract concepts.